/*
Theme Name: Passion Media
Theme URI: https://passion-media.com
Author: Passion Media Agency
Author URI: https://passion-media.com
Description: Professional WordPress theme for Passion digital marketing and app development agency with advanced animations and bilingual support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: passion
Tags: marketing, agency, portfolio, responsive, rtl-language-support
*/

/* ======================================
   CSS VARIABLES & DESIGN SYSTEM
   ====================================== */
:root {
    /* Brand Colors */
    --primary-blue: #1E3A8A;
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #1E40AF;
    --dark-navy: #0A1628;
    --darker-navy: #050D1A;
    --accent-cyan: #06B6D4;
    --accent-purple: #8B5CF6;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark-navy) 0%, var(--darker-navy) 100%);
    --gradient-glow: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
    --gradient-text: linear-gradient(90deg, var(--primary-blue-light), var(--accent-cyan));

    /* Typography */
    --font-en: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    --shadow-glow-lg: 0 0 80px rgba(59, 130, 246, 0.4);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(16px);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
    --z-loader: 500;
}

/* ======================================
   CSS RESET & BASE
   ====================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: clip;
    /* Use clip instead of hidden to not break position:sticky */
}

body {
    font-family: var(--font-en);
    background: var(--dark-navy);
    color: var(--white);
    line-height: 1.6;
    overflow-x: clip;
    /* Use clip instead of hidden to not break position:sticky */
    position: relative;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar for Dark Theme */
::-webkit-scrollbar {
    width: 10px;
    background: var(--dark-navy);
}

::-webkit-scrollbar-track {
    background: var(--dark-navy);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    border-radius: 5px;
    border: 2px solid var(--dark-navy);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* RTL Support */
html[dir="rtl"] body,
body.rtl {
    font-family: var(--font-ar);
    direction: rtl;
    line-height: 2.2 !important;
    /* Force relaxed line height for Arabic */
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    line-height: 1.5 !important;
    /* Slightly relaxed heading line height */
}

/* Ensure Header Spacing Matches LTR with Baseline Correction */
html[dir="rtl"] .portfolio-title {
    margin-top: 10px !important;
    /* Visual correction for Cairo font baseline */
    margin-bottom: var(--space-xl) !important;
    text-align: center !important;
    /* Center align title in RTL */
}

/* RTL Layout Adjustments */
html[dir="rtl"] .portfolio-sidebar {
    display: block !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
}

html[dir="rtl"] .portfolio-sidebar::before,
html[dir="rtl"] .portfolio-sidebar::after {
    display: none !important;
    content: none !important;
}

/* Reset Column Widths for Sidebar Layout in RTL */
html[dir="rtl"] .col-lg-8 {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
}

/* Remove the separator border in RTL */
html[dir="rtl"] .portfolio-content {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    outline: none !important;
}

html[dir="rtl"] .portfolio-content::before,
html[dir="rtl"] .portfolio-content::after {
    display: none !important;
    content: none !important;
}

html[dir="rtl"] .portfolio-layout {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

html[dir="rtl"] .portfolio-layout::before,
html[dir="rtl"] .portfolio-layout::after {
    display: none !important;
    content: none !important;
}

/* Handle Side Padding for Sidebar Layout in RTL */
html[dir="rtl"] .portfolio-sidebar {
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-top: 0 !important;
}

/* Kill any decorative vertical lines in RTL */
html[dir="rtl"] .project-info-card,
html[dir="rtl"] .project-technologies {
    border-left: none !important;
    border-right: none !important;
}

html[dir="rtl"] .portfolio-meta-info {
    gap: var(--space-xl) !important;
    margin-bottom: var(--space-2xl) !important;
}

/* Ensure container has identical side padding in RTL */
html[dir="rtl"] .container {
    padding-left: 5% !important;
    /* Significantly increased to force gutters */
    padding-right: 5% !important;
    width: 100%;
    max-width: 1440px !important;
    /* Explicit max-width for large screens */
    margin-left: auto;
    margin-right: auto;
}

/* Fix Video Grid Width in RTL */
html[dir="rtl"] .videos-grid,
html[dir="rtl"] .portfolio-before-after,
html[dir="rtl"] .project-gallery {
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    width: 100% !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* ======================================
   TYPOGRAPHY
   ====================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

.gradient-text {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none !important;
    /* Prevents shadow from rendering over transparent text */
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.8));
}

/* ======================================
   LAYOUT UTILITIES
   ====================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--gray-400);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ======================================
   GLASSMORPHISM UTILITIES
   ====================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.glass-panel:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ======================================
   PLUGIN COMPATIBILITY
   ====================================== */
/* Elementor Enhancements */
.elementor-page .container {
    max-width: 100%;
    padding: 0;
}

.elementor-section-stretched {
    max-width: 100vw;
}

/* Contact Form 7 & WPForms Styling */
.wpcf7-form .wpcf7-form-control,
.wpforms-form .wpforms-field-large,
.wpforms-form .wpforms-field-medium {
    background: var(--glass-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-md) !important;
    transition: all var(--transition-fast) !important;
}

.wpcf7-form .wpcf7-form-control:focus,
.wpforms-form .wpforms-field-large:focus,
.wpforms-form .wpforms-field-medium:focus {
    outline: none !important;
    border-color: var(--primary-blue-light) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3) !important;
}

.wpcf7-form input[type="submit"],
.wpforms-form button[type="submit"] {
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    padding: var(--space-md) var(--space-xl) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    color: var(--white) !important;
    transition: all var(--transition-normal) !important;
}

.wpcf7-form input[type="submit"]:hover,
.wpforms-form button[type="submit"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-glow) !important;
}

/* WPML / Polylang - ensure flags and switcher are aligned with dark theme */
.wpml-ls-item a,
.pll-parent-menu-item a {
    color: var(--white) !important;
}


/* ======================================
   LOADING SCREEN
   ====================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--dark-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    animation: pulse-glow 2s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--gray-800);
    border-radius: var(--radius-full);
    margin-top: var(--space-xl);
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--gradient-glow);
    border-radius: var(--radius-full);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(350%);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.8));
        transform: scale(1.05);
    }
}

/* ======================================
   NAVIGATION
   ====================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--space-md) 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-300);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-glow);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 3px;
}

.lang-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
}

.lang-btn:hover:not(.active) {
    color: var(--white);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ======================================
   BUTTONS
   ====================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 50px rgba(59, 130, 246, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-blue-light);
    transform: translateY(-3px);
}

.btn-icon {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
}

/* ======================================
   HERO SECTION (Fullscreen Scroll-Driven)
   ====================================== */
.hero {
    display: block !important;
    /* Override base theme's display:flex which pushes text off-screen */
    min-height: 400vh;
    /* Extended scroll space for immersive animation */
    position: relative;
    overflow: visible;
    padding-top: 0;
    background: var(--dark-navy);
}

/* Fullscreen Canvas — covers the entire sticky viewport */
#logo-sequence-canvas {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

/* Sticky viewport that pins content during scroll */
.hero-sticky-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
    pointer-events: none;
    margin-top: -100vh;
    /* Overlap on top of canvas */
}

/* Dark overlay gradient for text readability */
.hero-sticky-viewport::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 22, 40, 0.95) 0%,
            rgba(10, 22, 40, 0.8) 40%,
            rgba(10, 22, 40, 0.5) 70%,
            transparent 100%);
    z-index: 0;
    pointer-events: none;
}

/* Text content container */
.hero-scroll-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 var(--space-2xl) 0 var(--space-4xl);
    pointer-events: auto;
}

/* Scroll-driven text elements — VISIBLE by default for progressive enhancement */
.scroll-text {
    opacity: 1;
    transform: translateY(0);
    transition: none;
    will-change: opacity, transform;
}

/* Hero text styling adjustments for overlay mode */
.hero .hero-badge {
    margin-bottom: var(--space-lg);
}

.hero .hero-title {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8), 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--space-lg);
}

.hero .hero-subtitle {
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
    max-width: 550px;
    margin-bottom: var(--space-xl);
}

/* Scroll indicator (mouse icon) */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
}

.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-blue-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel-bounce 2s ease-in-out infinite;
}

@keyframes scroll-wheel-bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0.3;
    }
}

/* Particle Canvas */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Animated Background */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: rotate-bg 30s linear infinite;
}

@keyframes rotate-bg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.hero-glow-1 {
    top: 10%;
    right: 10%;
    background: var(--primary-blue);
}

.hero-glow-2 {
    bottom: 10%;
    left: 10%;
    background: var(--accent-purple);
    animation-delay: -4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* .hero .container grid is defined above in the Scroll-Driven Hero section */

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-blue-light);
    margin-bottom: var(--space-xl);
    animation: fade-in-up 0.8s ease forwards;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-blue-light);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    margin-bottom: var(--space-lg);
    animation: fade-in-up 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-title .line {
    display: block;
}

.hero-title .highlight {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.9));
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--gradient-glow);
    opacity: 0.3;
    z-index: -1;
    transform: skewX(-5deg);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: var(--space-2xl);
    line-height: 1.8;
    animation: fade-in-up 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    animation: fade-in-up 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    animation: fade-in-scale 1s ease 0.5s forwards;
    opacity: 0;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.3));
    animation: float-image 6s ease-in-out infinite;
}

@keyframes float-image {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Interactive Hero Logo */
.hero-logo-interactive {
    cursor: pointer;
    transition: all var(--transition-normal);
}

.hero-logo-interactive:hover {
    transform: scale(1.05);
}

.hero-logo {
    width: 280px;
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5)) drop-shadow(0 0 60px rgba(139, 92, 246, 0.3));
    animation: float-image 6s ease-in-out infinite,
        logo-glow 3s ease-in-out infinite alternate,
        logo-rotate 20s linear infinite;
    transition: all var(--transition-normal);
}

.hero-logo-interactive:hover .hero-logo {
    filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 100px rgba(139, 92, 246, 0.5)) drop-shadow(0 0 150px rgba(6, 182, 212, 0.3));
    animation: float-image 4s ease-in-out infinite,
        logo-glow-intense 1.5s ease-in-out infinite alternate;
}

@keyframes logo-glow {
    0% {
        filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5)) drop-shadow(0 0 60px rgba(139, 92, 246, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.7)) drop-shadow(0 0 80px rgba(139, 92, 246, 0.4));
    }
}

@keyframes logo-glow-intense {
    0% {
        filter: drop-shadow(0 0 50px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 100px rgba(139, 92, 246, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 80px rgba(6, 182, 212, 0.9)) drop-shadow(0 0 150px rgba(59, 130, 246, 0.6));
    }
}

@keyframes logo-rotate {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(2deg);
    }

    50% {
        transform: translateY(-20px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(-2deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-glow);
    opacity: 0.1;
    animation: pulse-shape 4s ease-in-out infinite;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

@keyframes pulse-shape {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.2;
    }
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: float-element 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    left: 10%;
    animation-delay: -2s;
}

.floating-icon:nth-child(3) {
    top: 30%;
    right: 5%;
    animation-delay: -4s;
}

.floating-icon:nth-child(4) {
    bottom: 20%;
    right: 10%;
    animation-delay: -1s;
}

@keyframes float-element {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ======================================
   SERVICES SECTION
   ====================================== */
.services {
    background: var(--darker-navy);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    transition: transform var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.service-card p {
    color: var(--gray-400);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.service-feature {
    padding: var(--space-xs) var(--space-md);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--primary-blue-light);
}

/* ======================================
   ABOUT SECTION
   ====================================== */
.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.about-content h2 {
    margin-bottom: var(--space-lg);
}

.about-content p {
    color: var(--gray-400);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.about-feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue-light);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.about-feature h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.about-feature p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0;
}

/* Stats */
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    color: var(--gray-400);
    font-size: 1rem;
}

/* ======================================
   PORTFOLIO SECTION
   ====================================== */
.portfolio {
    background: var(--darker-navy);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: var(--space-xl);
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.95), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-category {
    color: var(--primary-blue-light);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.portfolio-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--white);
    font-weight: 500;
    transition: gap var(--transition-fast);
}

.portfolio-link:hover {
    gap: var(--space-md);
}

/* ======================================
   TESTIMONIALS SECTION
   ====================================== */
.testimonials {
    position: relative;
    overflow: hidden;
}

.testimonials-slider {
    position: relative;
    padding-bottom: 50px;
    /* Space for pagination */
}

/* Swiper Pagination Styling */
.testimonials-slider .swiper-pagination {
    bottom: 0;
}

.testimonials-slider .swiper-pagination-bullet {
    background: var(--gray-500);
    opacity: 0.5;
    width: 10px;
    height: 10px;
    transition: all var(--transition-short);
}

.testimonials-slider .swiper-pagination-bullet-active {
    background: var(--primary-blue);
    opacity: 1;
    width: 25px;
    border-radius: 5px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-content {
    font-size: 1.25rem;
    color: var(--gray-300);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    font-style: italic;
}

.testimonial-content::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-blue-light);
    opacity: 0.3;
    line-height: 0;
    display: block;
    margin-bottom: var(--space-md);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue-light);
}

.testimonial-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.testimonial-role {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.testimonial-rating {
    color: #FFD700;
    margin-top: var(--space-sm);
}

/* ======================================
   CONTACT SECTION
   ====================================== */
.contact {
    background: var(--darker-navy);
}

.contact .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
}

.contact-info h2 {
    margin-bottom: var(--space-lg);
}

.contact-info>p {
    color: var(--gray-400);
    margin-bottom: var(--space-2xl);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue-light);
    font-size: 1.25rem;
}

.contact-item-content h4 {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
}

.contact-item-content p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-2xl);
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white);
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-500);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* ======================================
   FOOTER
   ====================================== */
.footer {
    background: var(--dark-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand p {
    color: var(--gray-400);
    margin: var(--space-lg) 0;
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-link {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-blue-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ======================================
   SCROLL ANIMATIONS (AOS-style)
   ====================================== */
[data-aos] {
    opacity: 0;
    transition: all 0.8s ease;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-down"] {
    transform: translateY(-50px);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos="zoom-out"] {
    transform: scale(1.1);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Animation Delays */
[data-aos-delay="100"] {
    transition-delay: 100ms;
}

[data-aos-delay="200"] {
    transition-delay: 200ms;
}

[data-aos-delay="300"] {
    transition-delay: 300ms;
}

[data-aos-delay="400"] {
    transition-delay: 400ms;
}

[data-aos-delay="500"] {
    transition-delay: 500ms;
}

/* ======================================
   PAGE TEMPLATE
   ====================================== */
.page-template {
    padding: 180px 0 100px;
    /* Increased from 150px to fix header overlap */
    position: relative;
    min-height: 100vh;
}

.page-article {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-featured-image {
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.page-featured-image img {
    width: 100%;
    height: auto;
}

.page-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-300);
}

.page-content h2,
.page-content h3,
.page-content h4 {
    color: var(--white);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.page-content p {
    margin-bottom: var(--space-lg);
}

.page-content a {
    color: var(--primary-blue-light);
}

.page-content img {
    border-radius: var(--radius-lg);
    margin: var(--space-xl) 0;
}

.page-content ul,
.page-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

html[dir="rtl"] .page-content ul,
html[dir="rtl"] .page-content ol {
    padding-left: 0;
    padding-right: var(--space-xl);
}

.page-content li {
    margin-bottom: var(--space-sm);
}

/* ======================================
   RESPONSIVE DESIGN
   ====================================== */
@media (max-width: 1200px) {

    .hero {
        min-height: 200vh;
        /* Shorter scroll on tablet */
    }

    .hero>.container,
    .about .container,
    .contact .container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        width: 100%;
        min-height: 250px;
    }

    .portfolio-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-4xl: 4rem;
        --space-3xl: 3rem;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 var(--space-3xl);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .floating-elements {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .btn {
        width: 100%;
    }

    .lang-switch {
        display: none;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   RTL SPECIFIC STYLES
   ====================================== */
html[dir="rtl"] {
    .nav-link::after {
        left: auto;
        right: 0;
    }

    .hero-title .highlight::after {
        transform: skewX(5deg);
    }

    .about-feature,
    .contact-item {
        flex-direction: row-reverse;
        text-align: right;
    }

    .floating-icon:nth-child(1) {
        left: auto;
        right: 5%;
    }

    .floating-icon:nth-child(2) {
        left: auto;
        right: 10%;
    }

    .floating-icon:nth-child(3) {
        right: auto;
        left: 5%;
    }

    .floating-icon:nth-child(4) {
        right: auto;
        left: 10%;
    }
}

/* RTL Overflow Fixes — using clip instead of hidden to preserve position:sticky */
html[dir="rtl"],
html[dir="rtl"] body,
body.rtl {
    overflow-x: clip !important;
    max-width: 100%;
    width: 100%;
    position: relative;
}

/* Global wrapper — clip prevents horizontal scroll without killing sticky */
html[dir="rtl"] #page,
html[dir="rtl"] .site,
html[dir="rtl"] .wrapper,
html[dir="rtl"] main,
html[dir="rtl"] .main-content,
html[dir="rtl"] article {
    overflow-x: clip;
    max-width: 100vw;
}

/* Hero MUST be overflow:visible for sticky children to work */
html[dir="rtl"] .hero {
    overflow: visible !important;
    max-width: 100vw;
}

html[dir="rtl"] .section:not(.hero) {
    overflow-x: clip;
    max-width: 100vw;
}

html[dir="rtl"] .container {
    max-width: 100%;
    overflow-x: clip;
}

html[dir="rtl"] .navbar {
    max-width: 100vw;
    overflow-x: clip;
}

/* Prevent animations from causing horizontal scroll in RTL */
html[dir="rtl"] [data-aos="fade-left"],
html[dir="rtl"] [data-aos="fade-right"] {
    overflow: hidden;
}

/* Footer fixes */
html[dir="rtl"] .footer {
    overflow-x: clip;
    max-width: 100vw;
}

/* ======================================
   MOBILE MENU STYLES
   ====================================== */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex !important;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        /* Start below navbar */
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-2xl);
        gap: var(--space-lg);
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    /* RTL Mobile Menu - Slide from Left */
    html[dir="rtl"] .nav-menu {
        right: auto;
        left: -100%;
        transition: left 0.4s ease;
    }

    html[dir="rtl"] .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-link {
        font-size: 1.25rem;
        padding: var(--space-md) var(--space-lg);
        width: 100%;
        text-align: center;
    }
}

/* ======================================
   MOBILE RESPONSIVE STYLES
   ====================================== */
@media (max-width: 768px) {

    /* Shrink Get Started Button on Mobile */
    .navbar .btn-primary {
        padding: var(--space-xs) var(--space-sm) !important;
        font-size: 0.75rem !important;
    }

    .navbar .btn-primary span {
        display: inline !important;
        /* Keep text visible */
    }

    /* Show Language Switch on Mobile */
    .nav-actions .lang-switch {
        display: flex !important;
    }

    /* Shrink Language Buttons on Mobile */
    .lang-btn {
        padding: var(--space-xs) var(--space-sm) !important;
        font-size: 0.75rem !important;
    }

    /* Nav Actions Layout on Mobile */
    .nav-actions {
        gap: var(--space-xs) !important;
    }

    /* Fix Gallery Spacing on Mobile - Force Single Column */
    .gallery-grid-mixed,
    .portfolio-gallery .gallery-grid-mixed {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--space-md) !important;
    }

    .gallery-grid-mixed .gallery-item,
    .portfolio-gallery .gallery-item {
        margin-bottom: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Remove grid-row span on mobile */
    .gallery-item.aspect-9-16,
    .gallery-item.aspect-3-4 {
        grid-row: auto !important;
        max-width: 100% !important;
    }
}

/* ======================================
   PRINT STYLES
   ====================================== */
@media print {

    .navbar,
    .loader,
    .floating-elements,
    #particles-canvas {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 2rem 0;
    }
}

/* ======================================
   LEGAL PAGES STYLES
   ====================================== */
.legal-page {
    padding: 150px 0 100px;
    position: relative;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-md);
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--gray-400);
    font-size: 1rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl);
}

.legal-content section {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-content section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.legal-content h3 {
    font-size: 1.125rem;
    color: var(--white);
    margin: var(--space-lg) 0 var(--space-md);
}

.legal-content p {
    color: var(--gray-100);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.legal-content ul {
    color: var(--gray-100);
    padding-left: var(--space-xl);
    margin-bottom: var(--space-md);
}

html[dir="rtl"] .legal-content ul {
    padding-left: 0;
    padding-right: var(--space-xl);
}

.legal-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary-blue-light);
}

.legal-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-content {
        padding: var(--space-xl);
    }
}