/* Font Face Definitions */
@font-face {
    font-family: 'Cairo';
    src: url('../font/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../font/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../font/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../font/Cairo-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cairo';
    src: url('../font/Cairo-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Variables & Theme */
:root {
    --font-main: 'Cairo', sans-serif;

    /* Dark Theme (Default) */
    --bg-body: #0d021a;
    /* Very dark purple, almost black */
    --bg-surface: #1a0b2e;
    /* Deep purple */
    --bg-header: rgba(13, 2, 26, 0.95);
    --bg-glass: rgba(26, 11, 46, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #b3a0cc;
    --primary: #8a2be2;
    /* BlueViolet */
    --accent: #00f3ff;
    /* Cyan Neon */
    --accent-glow: rgba(138, 43, 226, 0.3);
    /* Changed to softer purple glow */
    --icon-faint: rgba(255, 255, 255, 0.05);
    --gradient-main: linear-gradient(135deg, #8a2be2 0%, #4b0082 100%);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-body: #f4f7fa;
    --bg-surface: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #1a0b2e;
    --text-secondary: #5a4b6e;
    --primary: #6c5ce7;
    --accent: #d63031;
    --accent-glow: rgba(108, 92, 231, 0.2);
    --icon-faint: rgba(108, 92, 231, 0.1);
    /* Darker for visibility on light bg */
    --gradient-main: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --shadow-card: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --border-glass: 1px solid rgba(138, 43, 226, 0.1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: var(--gradient-main);
    margin: 10px auto 0;
    border-radius: 2px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--gradient-main);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.glass-card:hover::before {
    transform: scaleX(1);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.4s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    position: relative;
    font-size: 1.05rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    /* RTL default */
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
    transform: rotate(15deg);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 25px;
    background: linear-gradient(to right, #fff, #b3a0cc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(to right, #1a0b2e, #6c5ce7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D-like Animation Effect */
.glowing-orb {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    opacity: 0.4;
    position: absolute;
    filter: blur(40px);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Services */
.service-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    transition: transform 0.4s ease;
}

.glass-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--accent);
}

/* Works */
.work-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Swiper Slide Fixes */
.social-slide {
    width: 300px;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
}

/* Specific Sizes for Other Sliders to prevent LTR collapse */
.mySwiper .swiper-slide {
    width: 600px;
    /* Wider for Landscape/16:9 images */
    height: 340px;
    border-radius: 15px;
    overflow: hidden;
}

.logoSwiper .swiper-slide {
    width: 150px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-slide img,
.mySwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logoSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 576px) {

    .social-slide {
        width: 80%;
        height: auto;
        aspect-ratio: 1 / 1;
        /* Square for mobile as requested */
    }

    .mySwiper .swiper-slide {
        width: 90%;
        height: 250px;
        /* Landscape-ish for mobile */
    }
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 2, 26, 0.95), rgba(13, 2, 26, 0.2));
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-card:hover .work-img {
    transform: scale(1.1);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

/* Offers */
.offers {
    background: linear-gradient(180deg, var(--bg-body), var(--bg-surface));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.offer-badge {
    background: var(--gradient-main);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Footer */
footer {
    background: var(--bg-surface);
    padding: 60px 0 20px;
    text-align: center;
    border-top: var(--border-glass);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.foot-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.contact-info {
    margin-bottom: 30px;
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: bold;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-links a::after {
    left: 0;
    right: auto;
    transform-origin: right;
}

[dir="rtl"] .hero-content {
    order: 1;
    /* In RTL, content stays right if row is normal, but usually flex direction manages this? 
                 Actually flex-direction: row-reverse might be needed or just let text-align handle it. 
                 Let's stick to text-align mostly, but for hero flex, we might need order. */
}

[dir="rtl"] .glass-card::before {
    transform-origin: right;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        padding-bottom: 50px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        /* Hidden */
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-body);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
        align-items: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Fix RTL Mobile Order for Hero */
    [dir="rtl"] .hero-content {
        order: 0;
    }
}

/* Active Link Style */
.nav-links a.active {
    color: var(--accent);
    font-weight: bold;
}

.nav-links a.active::after {
    width: 100%;
    /* Keep underline for active state */
}

/* Header Scrolled State */
header.scrolled {
    background: rgba(18, 18, 18, 0.95);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Footer Nav */
.foot-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.foot-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.3s;
    font-size: 1rem;
}

.foot-nav a:hover {
    color: var(--accent);
}

@media (max-width: 576px) {
    .container {
        width: 92%;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
}

/* About Section Preview Card (Index) */
.about-preview-card {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .about-preview-card {
        flex-direction: column-reverse;
        text-align: center;
    }
}

.cta-card {
    background: linear-gradient(135deg, rgba(26, 11, 46, 0.9), rgba(138, 43, 226, 0.2));
    border: 1px solid var(--accent);
    color: #fff;
    /* Ensure text is white on dark gradient */
}

/* Light Theme Override for CTA Card */
[data-theme="light"] .cta-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid rgba(138, 43, 226, 0.2);
    color: var(--text-primary);
    /* Dark text for light background */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Floating WhatsApp Button ========== */
.whatsapp-float {
    position: fixed;
    bottom: 35px;
    right: 35px;
    z-index: 9999;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2rem;
    text-decoration: none;
    box-shadow:
        0 4px 15px rgba(37, 211, 102, 0.4),
        0 0 30px rgba(37, 211, 102, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: whatsapp-glow 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow:
        0 6px 25px rgba(37, 211, 102, 0.6),
        0 0 50px rgba(37, 211, 102, 0.35);
    color: #fff;
}

/* Pulse ring behind the button */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    z-index: -1;
    animation: whatsapp-pulse 2s ease-out infinite;
}

@keyframes whatsapp-glow {

    0%,
    100% {
        box-shadow:
            0 4px 15px rgba(37, 211, 102, 0.4),
            0 0 30px rgba(37, 211, 102, 0.2);
    }

    50% {
        box-shadow:
            0 4px 20px rgba(37, 211, 102, 0.6),
            0 0 45px rgba(37, 211, 102, 0.35);
    }
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Tooltip on hover */
.whatsapp-float .whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: #25d366;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-main);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-float .whatsapp-tooltip::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #25d366;
}

/* RTL: tooltip on right side */
[dir="rtl"] .whatsapp-float .whatsapp-tooltip {
    right: 75px;
    left: auto;
    transform: translateX(10px);
}

[dir="rtl"] .whatsapp-float .whatsapp-tooltip::before {
    left: 100%;
    right: auto;
    border-right-color: #25d366;
    border-left-color: transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .whatsapp-float {
        bottom: 30px;
        right: 30px;
        width: 58px;
        height: 58px;
        font-size: 1.8rem;
    }

    .whatsapp-float .whatsapp-tooltip {
        display: none;
    }
}