/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Tajawal:wght@400;500;700&display=swap');

:root {
    /* Premium Gold/Bronze Palette */
    --primary: #d4af37;
    --primary-light: #f3e5ab;
    --primary-gradient: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%);

    /* Midnight Navy / Royal Colors */
    --accent: #0f1c2e;
    --accent-light: #1f3a5f;

    /* Backgrounds */
    --bg-main: #f8fbff;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-solid: #ffffff;

    /* Text */
    --text-primary: #1e293b;
    --text-muted: #475569;

    /* Glassmorphism & Borders */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --header-bg: rgba(255, 255, 255, 0.75);
    --footer-bg: #0f1c2e;

    /* Typography Specifics */
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body.dark-mode {
    --primary: #e6c258;
    --primary-gradient: linear-gradient(135deg, #e6c258 0%, #b8860b 100%);

    --bg-main: #060b13;
    /* Very deep navy/black */
    --bg-surface: rgba(15, 28, 46, 0.6);
    --bg-solid: #0f1c2e;

    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;

    --glass-bg: rgba(15, 28, 46, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --header-bg: rgba(6, 11, 19, 0.85);
    --footer-bg: #03060b;
    --accent: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent);
    font-weight: 800;
}

a,
button,
input,
select,
textarea {
    font-family: var(--font-body);
}

/* Background Glowing Orbs for Depth */
.bg-glow,
.bg-glow-2 {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.bg-glow {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -100px;
    opacity: 0.15;
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-light);
    bottom: -200px;
    left: -150px;
    opacity: 0.08;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(30px) scale(1.05);
    }
}

/* Abstract Node/Grid Animation for Hero (Audit Theme) */
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

body.dark-mode .hero-bg-animation {
    opacity: 0.15;
}

.cube {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    opacity: 0.2;
    animation: drift 20s infinite linear;
}

.cube-1 {
    top: 20%;
    left: 15%;
    animation-duration: 25s;
}

.cube-2 {
    top: 60%;
    left: 80%;
    width: 120px;
    height: 120px;
    animation-duration: 35s;
    animation-direction: reverse;
}

.cube-3 {
    top: 80%;
    left: 10%;
    width: 50px;
    height: 50px;
    animation-duration: 15s;
}

.cube-4 {
    top: 15%;
    left: 70%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    animation-duration: 20s;
}

@keyframes drift {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-400px) rotate(360deg);
        opacity: 0;
    }
}

/* Glass Header */
header {
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--glass-shadow);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo img {
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    right: 0;
    /* RTL direction */
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
    position: relative;
    backdrop-filter: blur(4px);
}

.icon-btn:hover {
    color: var(--bg-solid);
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--accent);
    color: #fff;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: var(--font-body);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1rem 4rem;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 900px;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

body.dark-mode .hero h1 {
    color: var(--primary);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Stats Overlay Section */
.stats-wrapper {
    margin-top: -80px;
    position: relative;
    z-index: 20;
    padding: 0 2rem;
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    box-shadow: var(--glass-shadow);
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Services / Bento Grid */
.services-section {
    padding: 8rem 2rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    display: inline-block;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 4px;
}

.bento-grid {
    display: grid;
    /* 3 columns on large screens, 2 on medium, 1 on small */
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0;
    transition: var(--transition);
    border-radius: 50%;
    z-index: 0;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.bento-card:hover::before {
    opacity: 0.15;
}

.bento-card>* {
    position: relative;
    z-index: 1;
}

.bento-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 16px;
}

.bento-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.bento-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    flex-grow: 1;
}



/* Clients Banner */
.clients-banner {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.02), transparent);
    overflow: hidden;
    position: relative;
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: scroll-left 40s linear infinite;
}

.client-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    opacity: 0.3;
    transition: var(--transition);
    width: 150px;
    display: flex;
    justify-content: center;
}

.client-icon:hover {
    color: var(--primary);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
        /* For RTL direction */
    }
}

/* Map Section */
.location-wrapper {
    width: 100%;
    height: 450px;
    position: relative;
    border-top: 1px solid var(--glass-border);
    filter: grayscale(0.5);
    transition: filter 0.5s ease;
}

.location-wrapper:hover {
    filter: grayscale(0);
}

/* Contact Section */
.contact-section {
    padding: 6rem 2rem;
    background: var(--bg-main);
    position: relative;
}

.contact-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-form {
    background: var(--bg-solid);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1.2rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-block {
    width: 100%;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 2rem 2rem;
    transition: background-color 0.4s ease;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3.logo {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col i {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations Helper */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        backdrop-filter: blur(16px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-actions {
        display: none;
        /* Can be moved inside mobile menu */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .stats-wrapper {
        margin-top: 2rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}