/**
 * أنماط واجهة الموقع الأمامية (Frontend)
 * يتم تحميلها من layouts/app.blade.php بعد ثيم الألوان (ThemeService)
 */

:root {
    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Inter', sans-serif;
}

body.locale-ar {
    font-family: var(--font-arabic);
}

body.locale-en {
    font-family: var(--font-english);
}

.rtl {
    direction: rtl;
}

.ltr {
    direction: ltr;
}

/* ========== Hero - هوية بصرية (ألوان الشعار) ========== */
.hero-bg-gradient {
    background: linear-gradient(135deg, var(--primary-50, #eff6ff) 0%, #fff 45%, var(--accent-50, #ecfdf5) 100%);
}
.hero-grid-pattern {
    background-image: radial-gradient(circle, var(--primary-color) 1px, transparent 1px), radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
}
.particle-brand {
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFloat 6s ease-in-out infinite;
}
.particle-brand:nth-child(even) {
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
}
.hero-blob-primary {
    background: linear-gradient(135deg, var(--primary-200), var(--secondary-200));
    opacity: 0.5;
}
.hero-blob-accent {
    background: linear-gradient(135deg, var(--accent-300), var(--primary-200));
    opacity: 0.5;
}
.hero-glow {
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 30% 50%, var(--primary-100) 0%, transparent 60%);
    opacity: 0.9;
}
[dir="rtl"] .hero-glow {
    background: radial-gradient(ellipse 80% 50% at 70% 50%, var(--primary-100) 0%, transparent 60%);
}
.gradient-text-brand {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 40%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientTextShift 4s ease-in-out infinite;
}
@keyframes gradientTextShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.hero-stat-card {
    background: rgba(255,255,255,0.75);
    border-color: rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.hero-stat-num-primary { color: var(--primary-color) !important; }
.hero-stat-num-accent { color: var(--accent-color) !important; }
.hero-stat-num-secondary { color: var(--secondary-color) !important; }
.hero-slide-brand {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
}
.hero-orb-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.hero-orb-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}
.scroll-indicator-brand { animation: bounce 2s ease-in-out infinite; }
.scroll-mouse-brand { border-color: var(--primary-color); }
.scroll-dot-brand { background: var(--primary-color); }
.scroll-label-brand { color: var(--primary-color); }
.group:hover .hero-feature-title-accent { color: var(--accent-color); }
.hero-link-accent:hover { color: var(--accent-600) !important; }

.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-700) 100%);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--primary-200);
}

.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}
@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.6); }
}

.gradient-text {
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.morphing-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphing 8s ease-in-out infinite;
}
@keyframes morphing {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 30% 60% 40% / 30% 50% 60% 70%; }
    75% { border-radius: 40% 70% 50% 60% / 70% 40% 50% 30%; }
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFloat 6s ease-in-out infinite;
}
@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 1; }
}

.neon-glow {
    box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff, 0 0 20px #00ffff;
    animation: neonFlicker 2s ease-in-out infinite alternate;
}
@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff, 0 0 20px #00ffff; }
    20%, 24%, 55% { box-shadow: none; }
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.text-reveal { overflow: hidden; }
.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.8s ease-out forwards;
}
@keyframes textReveal {
    to { transform: translateY(0); }
}

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.magnetic:hover {
    transform: scale(1.05);
}

.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
}
.product-card:hover .glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-gradient-shimmer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}
.btn-gradient-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmerEffect 2s infinite;
}
@keyframes shimmerEffect {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-outline-hover {
    border: 2px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-outline-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: left 0.3s ease;
    z-index: -1;
}
.btn-outline-hover:hover::before {
    left: 0;
}
.btn-outline-hover:hover {
    border-color: transparent;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}
.hero-slide.prev {
    transform: translateX(-100%);
}
.slider-dot.active {
    background: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.2);
}
.hero-slider-nav:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-50%) scale(1.1);
}

.scroll-down-btn {
    transition: all 0.3s ease;
}
.scroll-down-btn:hover {
    transform: translateY(-2px);
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.custom-cursor { transition: all 0.1s ease; }
.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(2);
    background: rgba(37, 99, 235, 0.3);
}

html {
    scroll-behavior: smooth;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.loading.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#main-header.scrolled {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    padding-top: 80px;
}
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

.mobile-menu {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.glass-effect-enhanced {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px;
    border-radius: 12px;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: white;
    border-radius: 10px;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.gradient-text-animated {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.btn-hover-effect:hover::before {
    transform: scaleX(1);
}
.btn-hover-effect span {
    position: relative;
    z-index: 2;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-hover-effect:hover span {
    color: white;
}

/* Enhanced button styles (outline + icon on hover) */
.btn-outline-hover {
    position: relative;
    overflow: hidden;
    border: 2px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}
.btn-outline-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: currentColor;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.btn-outline-hover:hover::before {
    left: 0;
}
.btn-outline-hover span {
    position: relative;
    z-index: 2;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
}
.btn-outline-hover:hover span {
    color: white;
}
.btn-outline-hover i {
    position: relative;
    z-index: 2;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-outline-hover:hover i {
    color: white !important;
}
.btn-outline-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-gradient-shimmer {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-gradient-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}
.btn-gradient-shimmer:hover::before {
    left: 100%;
}
.btn-gradient-shimmer span {
    position: relative;
    z-index: 2;
}

.btn-white-fixed {
    position: relative;
    background: white;
    color: #2563EB;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.btn-white-fixed::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #2563EB;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.btn-white-fixed:hover::before {
    left: 0;
}
.btn-white-fixed span {
    position: relative;
    z-index: 2;
    color: #2563EB;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-white-fixed:hover span {
    color: white;
}
.btn-white-fixed:hover {
    border-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-gradient-hover {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-gradient-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-gradient-hover:hover::before {
    left: 100%;
}
