@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/YekanBakh-Regular-CtIiwT9t.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/YekanBakh-SemiBold-BNQzDdZG.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/YekanBakh-Bold-Di-_VFZV.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansWeb_Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

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

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

body {
    font-family: 'YekanBakh', 'IRANSans', Tahoma, Arial, sans-serif;
    background-color: #0a0a0f;
    color: #ffffff;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode Styles - Optimized without excessive !important */
html:not(.dark) body {
    background-color: #ffffff;
    color: #1a1a1a;
}

html:not(.dark) .glass-effect {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1a1a1a;
}

html:not(.dark) .glass-effect * {
    color: #1a1a1a;
}

html:not(.dark) body .text-white {
    color: #1a1a1a;
}

html:not(.dark) .text-gray-400 {
    color: #4b5563;
}

html:not(.dark) .text-gray-300 {
    color: #374151;
}

html:not(.dark) .text-gray-500 {
    color: #6b7280;
}

html:not(.dark) .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.1);
}

html:not(.dark) .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.15);
}

html:not(.dark) .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.03);
}

html:not(.dark) .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.05);
}

html:not(.dark) header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

html:not(.dark) footer {
    background-color: #f8f9fa;
    border-top-color: rgba(0, 0, 0, 0.1);
}

html:not(.dark) body .hover\:text-white:hover {
    color: #111827;
}

html:not(.dark) .hover\:bg-white\/5:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

html:not(.dark) .hover\:bg-white\/10:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

html:not(.dark) .hover\:border-white\/20:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

/* Keep !important only for gradient backgrounds that need white text */
html:not(.dark) body .bg-primary,
html:not(.dark) body .bg-primary * {
    color: #ffffff !important;
}

/* Fix text color for gradient backgrounds in light mode */
html:not(.dark) .bg-gradient-to-r.text-white,
html:not(.dark) .bg-gradient-to-br.text-white,
html:not(.dark) .animated-gradient.text-white {
    color: #ffffff !important;
}

html:not(.dark) .bg-gradient-to-r.text-white *,
html:not(.dark) .bg-gradient-to-br.text-white *,
html:not(.dark) .animated-gradient.text-white * {
    color: #ffffff !important;
}

/* Theme Toggle Icons */
html.dark .light-icon {
    display: none;
}

html.dark .dark-icon {
    display: block;
}

html:not(.dark) .light-icon {
    display: block;
}

html:not(.dark) .dark-icon {
    display: none;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

html:not(.dark) ::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #7f13ec;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b11c7;
}

.glass-effect {
    background: rgba(20, 20, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.gradient-text {
    color: #7f13ec;
    background: linear-gradient(135deg, #7f13ec 0%, #b91cec 50%, #ec13d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-flow 3s ease infinite;
}

@keyframes gradient-flow {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Animated Gradient Background - Single Definition */
.animated-gradient {
    background: linear-gradient(135deg, #7f13ec 0%, #b91cec 50%, #ec13d8 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Float Animation - Single Definition */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
    will-change: transform;
}

/* Glow Animation - Single Definition */
@keyframes glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
    will-change: opacity, transform;
}

/* Fade In Animation - Single Definition */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out;
}

/* Ping Animation - Single Definition */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Card Hover Effect */
.card-hover-effect {
    position: relative;
    overflow: hidden;
}

.card-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(127, 19, 236, 0.1);
    transition: left 0.5s;
}

.card-hover-effect:hover::before {
    left: 100%;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7f13ec;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Improved Form Validation */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Better Mobile Touch Targets */
@media (max-width: 768px) {
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduced Motion for Accessibility - Modified for better UX */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        -webkit-animation-duration: 0.01ms !important;
        -moz-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        -moz-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    
    /* Keep essential transitions for UI feedback */
    button,
    a,
    input,
    select,
    textarea,
    .nav-link,
    .mobile-nav-link {
        -webkit-transition-duration: 0.15s !important;
        -moz-transition-duration: 0.15s !important;
        -o-transition-duration: 0.15s !important;
        transition-duration: 0.15s !important;
    }
}

/* Removed duplicate and conflicting media query */

/* Better Image Loading */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading with fallback */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img[loading="lazy"].lazyloaded {
    opacity: 1;
}

/* Fallback: Show image after 1 second if class not added */
@keyframes lazy-fallback {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

img[loading="lazy"]:not(.loaded):not(.lazyloaded) {
    animation: lazy-fallback 0.3s ease-in 1s forwards;
}

/* Skeleton Loading for Images */
img:not([src]) {
    background: linear-gradient(90deg, rgba(127, 19, 236, 0.1) 25%, rgba(127, 19, 236, 0.2) 50%, rgba(127, 19, 236, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animation Delays */
[class*="animation-delay"],
[style*="animation-delay"] {
    animation-fill-mode: both;
}

/* Hover Lift Effect with Stagger */
.hover-lift {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(127, 19, 236, 0.3);
}

/* Card Hover Effects */
.card-hover-effect {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Icon Scale on Hover */
.card-hover-effect:hover .group-hover\:scale-110,
.group:hover .group-hover\:scale-110 {
    transform: scale(1.15) rotate(5deg);
}

/* Border Glow Effect */
.card-hover-effect:hover,
.hover-lift:hover {
    border-color: rgba(127, 19, 236, 0.5) !important;
    box-shadow: 0 0 30px rgba(127, 19, 236, 0.2), 
                0 20px 40px rgba(127, 19, 236, 0.3);
}

/* Staggered Animation Support */
.hover-lift:nth-child(1) {
    transition-delay: 0s;
}

.hover-lift:nth-child(2) {
    transition-delay: 0.05s;
}

.hover-lift:nth-child(3) {
    transition-delay: 0.1s;
}

.hover-lift:nth-child(4) {
    transition-delay: 0.15s;
}

.hover-lift:nth-child(5) {
    transition-delay: 0.2s;
}

.hover-lift:nth-child(6) {
    transition-delay: 0.25s;
}

/* Button Hover Effects */
a[class*="bg-primary"],
button[class*="bg-primary"],
a[class*="bg-fuchsia"],
button[class*="bg-fuchsia"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a[class*="bg-primary"]:hover,
button[class*="bg-primary"]:hover,
a[class*="bg-fuchsia"]:hover,
button[class*="bg-fuchsia"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(127, 19, 236, 0.4);
}

a[class*="bg-primary"]:active,
button[class*="bg-primary"]:active,
a[class*="bg-fuchsia"]:active,
button[class*="bg-fuchsia"]:active {
    transform: translateY(0);
}

/* Glass Effect Buttons */
a[class*="glass-effect"]:hover,
button[class*="glass-effect"]:hover {
    background: rgba(127, 19, 236, 0.1);
    border-color: rgba(127, 19, 236, 0.3);
}

/* Navigation Links */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7f13ec, #b91cec);
    transition: width 0.3s ease;
}

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

/* Mobile Nav Links */
.mobile-nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #7f13ec, #b91cec);
    transition: height 0.3s ease;
    border-radius: 2px;
}

.mobile-nav-link:hover::before {
    height: 70%;
}

/* Smooth Icon Transitions */
.material-symbols-outlined {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Social Links Hover */
a[href*="t.me"]:hover svg,
a[href*="linkedin"]:hover svg,
a[href*="wa.me"]:hover svg,
a[href*="twitter"]:hover svg {
    transform: scale(1.2) rotate(5deg);
}

/* Form Input Focus */
input:focus,
textarea:focus,
select:focus {
    background: rgba(127, 19, 236, 0.05) !important;
    border-color: #7f13ec !important;
    box-shadow: 0 0 0 3px rgba(127, 19, 236, 0.1);
}

/* Pricing Card Featured Scale */
.scale-105 {
    transform: scale(1.05);
}

.scale-105:hover {
    transform: scale(1.08) translateY(-5px);
}

/* Image Hover Effects */
img {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-3xl img:hover {
    transform: scale(1.05);
}

/* Stats Counter Animation */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Effect for Active Elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(127, 19, 236, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(127, 19, 236, 0);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(127, 19, 236, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(127, 19, 236, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Bounce on Hover */
@keyframes bounce-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.hover-bounce:hover {
    animation: bounce-subtle 0.6s ease;
}

/* Rotate on Hover */
.hover-rotate:hover {
    animation: rotate-360 0.6s ease;
}

@keyframes rotate-360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Slide In Animations */
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slide-in-right 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.6s ease-out;
}

/* Glow Border Animation */
@keyframes glow-border {
    0%, 100% {
        border-color: rgba(127, 19, 236, 0.3);
        box-shadow: 0 0 5px rgba(127, 19, 236, 0.2);
    }
    50% {
        border-color: rgba(127, 19, 236, 0.8);
        box-shadow: 0 0 20px rgba(127, 19, 236, 0.6);
    }
}

.animate-glow-border {
    animation: glow-border 2s ease-in-out infinite;
}

/* Text Reveal Animation */
@keyframes text-reveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-text-reveal {
    animation: text-reveal 0.8s ease-out;
}

/* Stagger Children Animation */
.stagger-children > * {
    animation: fade-in 0.6s ease-out backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Navigation Active State Transitions
   ======================================== */

/* Enhanced Navigation Link Transitions - Compatible with Tailwind */
.nav-link {
    position: relative !important;
    overflow: hidden !important;
}

/* Remove default underline animation for active state */
.nav-link.bg-primary::after {
    display: none;
}

/* Active state with smooth transition - uses Tailwind classes + custom gradient */
.nav-link.bg-primary {
    background: linear-gradient(135deg, #ec4899, #a855f7) !important;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3), 0 4px 6px -4px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
    font-weight: 700 !important;
    transform: translateY(-1px);
}

/* Mobile nav link active state */
.mobile-nav-link.bg-primary {
    background: linear-gradient(135deg, #ec4899, #a855f7) !important;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
    font-weight: 700 !important;
}

/* Remove the side indicator for active mobile links */
.mobile-nav-link.bg-primary::before {
    display: none;
}

/* ========================================
   Active Navigation State for Dynamic Classes
   ======================================== */

/* Ensure nav-link active state styles work even when dynamically added */
.nav-link.active,
.nav-link.bg-primary {
    background: linear-gradient(135deg, #ec4899, #a855f7) !important;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3), 0 4px 6px -4px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
    font-weight: 700 !important;
    transform: translateY(-1px);
}

/* Mobile nav link active state */
.mobile-nav-link.active,
.mobile-nav-link.bg-primary {
    background: linear-gradient(135deg, #ec4899, #a855f7) !important;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
    font-weight: 700 !important;
}

/* Light mode adjustments for active nav links */
html:not(.dark) .nav-link.active,
html:not(.dark) .nav-link.bg-primary,
html:not(.dark) .mobile-nav-link.active,
html:not(.dark) .mobile-nav-link.bg-primary {
    color: white !important;
}

/* Ensure shadow-primary/30 works for dynamically added classes */
.nav-link.shadow-lg,
.mobile-nav-link.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(127, 19, 236, 0.3), 0 4px 6px -4px rgba(127, 19, 236, 0.3) !important;
}

/* Ensure smooth color transitions for text */
.nav-link,
.mobile-nav-link {
    transition-property: all;
    transition-timing-function: ease-in-out;
    transition-duration: 300ms;
}
/* Global Select Dropdown Dark Mode Styles */
select option {
    background-color: #ffffff;
    color: #0f172a;
}

.dark select option {
    background-color: #1e293b;
    color: #f1f5f9;
}

/* Removed prefers-color-scheme media query - theme is now user-controlled only */