/**
 * MIRAD Premium Animations & Interactions
 * Award-worthy motion system with luxury effects
 * Works on ALL devices: Desktop, Laptop, Tablet, Mobile
 * 
 * @package Mirad_Developer
 * @version 2.1.0
 */

/* =============================================
   NO-JS FALLBACK - Show content if JS fails
   ============================================= */
.no-js [data-animate],
.no-js [data-animate-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
}

/* =============================================
   CSS VARIABLES - Animation System
   ============================================= */
:root {
    /* Brand Colors (LOCKED) */
    --mirad-blue-dark: #285070;
    --mirad-blue-light: #88a5b9;
    --mirad-gold-1: #e5b869;
    --mirad-gold-2: #ebdbb5;
    --mirad-gold-3: #c29f6f;
    --mirad-text: #1e2b36;
    --mirad-bg-soft: rgba(136, 165, 185, 0.08);
    
    /* Typography */
    --mirad-font-primary: "Montserrat", "GE Dinar Two", "Helvetica Neue", Arial, sans-serif;
    --mirad-font-secondary: "Adelle", Georgia, "Times New Roman", serif;
    --mirad-font-ar: "GE Dinar Two", "Montserrat", sans-serif;
    
    /* Premium Easing Functions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* Durations */
    --duration-instant: 0.1s;
    --duration-fast: 0.2s;
    --duration-normal: 0.4s;
    --duration-slow: 0.6s;
    --duration-slower: 0.8s;
    --duration-slowest: 1.2s;
    
    /* Reveal System */
    --mirad-reveal-duration: 1s;
    --mirad-stagger-delay: 0.08s;
    --mirad-hero-underline-duration: 1.4s;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.85);
    --glass-blur: 20px;
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(40, 80, 112, 0.12);
}

/* =============================================
   KEYFRAMES - Premium Animation Library
   ============================================= */

/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes textRevealRTL {
    from {
        clip-path: inset(0 0 0 100%);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Line Draw Animation */
@keyframes lineGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes lineGrowVertical {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

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

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

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

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(1deg);
    }
    75% {
        transform: translateY(-4px) rotate(-1deg);
    }
}

/* Pulse & Glow */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(229, 184, 105, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(229, 184, 105, 0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(229, 184, 105, 0.5),
                    0 0 10px rgba(229, 184, 105, 0.3),
                    0 0 15px rgba(229, 184, 105, 0.1);
    }
    50% {
        box-shadow: 0 0 10px rgba(229, 184, 105, 0.8),
                    0 0 20px rgba(229, 184, 105, 0.5),
                    0 0 30px rgba(229, 184, 105, 0.3);
    }
}

/* Gradient Morph */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Rotate Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

/* Particle Float */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(10px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(-5px, -40px) rotate(180deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(-15px, -20px) rotate(270deg);
    }
}

/* Ken Burns Effect */
@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(-2%, -1%);
    }
}

/* Underline Draw */
@keyframes underlineDraw {
    from {
        background-size: 0% 2px;
    }
    to {
        background-size: 100% 2px;
    }
}

/* Morphing Background */
@keyframes morphBg {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* Spinner */
@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* =============================================
   DATA-ANIMATE REVEAL SYSTEM
   Works on ALL devices: Desktop, Laptop, Tablet, Mobile
   ============================================= */

/* Base state - hidden */
[data-animate] {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fallback: Show after 4 seconds if JS fails */
@supports (animation: none) {
    [data-animate] {
        animation: fallbackReveal 0.01s 4s forwards;
    }
    
    @keyframes fallbackReveal {
        to {
            opacity: 1;
            transform: none;
        }
    }
    
    [data-animate].is-visible {
        animation: none;
    }
}

[data-animate="fade-in"] {
    transform: translateY(0);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="fade-up"] {
    transform: translateY(40px);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="fade-down"] {
    transform: translateY(-40px);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="scale-up"] {
    transform: scale(0.85);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-back),
                transform var(--mirad-reveal-duration) var(--ease-out-back);
}

[data-animate="scale-down"] {
    transform: scale(1.15);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="zoom-in"] {
    transform: scale(0.5);
    transition: opacity var(--duration-slow) var(--ease-out-back),
                transform var(--duration-slow) var(--ease-out-back);
}

[data-animate="rotate-in"] {
    transform: rotate(-10deg) scale(0.9);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="flip-up"] {
    transform: perspective(1000px) rotateX(45deg);
    transform-origin: bottom;
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                transform var(--mirad-reveal-duration) var(--ease-out-expo);
}

[data-animate="blur-in"] {
    filter: blur(10px);
    transition: opacity var(--mirad-reveal-duration) var(--ease-out-expo),
                filter var(--mirad-reveal-duration) var(--ease-out-expo);
}

/* Visible State - HIGH PRIORITY */
[data-animate].is-visible,
.is-visible[data-animate] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

/* Stagger Children */
[data-animate-stagger] > * {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate-stagger].is-visible > *:nth-child(1) { transition-delay: calc(var(--mirad-stagger-delay) * 1); }
[data-animate-stagger].is-visible > *:nth-child(2) { transition-delay: calc(var(--mirad-stagger-delay) * 2); }
[data-animate-stagger].is-visible > *:nth-child(3) { transition-delay: calc(var(--mirad-stagger-delay) * 3); }
[data-animate-stagger].is-visible > *:nth-child(4) { transition-delay: calc(var(--mirad-stagger-delay) * 4); }
[data-animate-stagger].is-visible > *:nth-child(5) { transition-delay: calc(var(--mirad-stagger-delay) * 5); }
[data-animate-stagger].is-visible > *:nth-child(6) { transition-delay: calc(var(--mirad-stagger-delay) * 6); }
[data-animate-stagger].is-visible > *:nth-child(7) { transition-delay: calc(var(--mirad-stagger-delay) * 7); }
[data-animate-stagger].is-visible > *:nth-child(8) { transition-delay: calc(var(--mirad-stagger-delay) * 8); }
[data-animate-stagger].is-visible > *:nth-child(9) { transition-delay: calc(var(--mirad-stagger-delay) * 9); }
[data-animate-stagger].is-visible > *:nth-child(10) { transition-delay: calc(var(--mirad-stagger-delay) * 10); }
[data-animate-stagger].is-visible > *:nth-child(11) { transition-delay: calc(var(--mirad-stagger-delay) * 11); }
[data-animate-stagger].is-visible > *:nth-child(12) { transition-delay: calc(var(--mirad-stagger-delay) * 12); }

[data-animate-stagger].is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */

.site-header {
    transition: background-color var(--duration-normal) var(--ease-smooth),
                box-shadow var(--duration-normal) var(--ease-smooth),
                backdrop-filter var(--duration-normal) var(--ease-smooth);
}

.site-header.scrolled {
    background: var(--glass-bg-light) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 4px 30px rgba(40, 80, 112, 0.15);
}

/* Nav Links */
.main-menu li {
    position: relative;
}

.main-menu li a {
    position: relative;
    padding-bottom: 6px;
    font-weight: 600;
    color: var(--mirad-blue-dark);
    transition: color var(--duration-fast) var(--ease-smooth);
}

.main-menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
    transition: width var(--duration-normal) var(--ease-out-expo);
}

html[dir="rtl"] .main-menu li a::after {
    left: auto;
    right: 0;
}

.main-menu li a:hover,
.main-menu li.current-menu-item a {
    color: var(--mirad-gold-1);
}

.main-menu li a:hover::after,
.main-menu li.current-menu-item a::after {
    width: 100%;
}

/* Header Logo Animation */
[data-animate="nav-logo"] {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
}

[data-animate="nav-logo"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nav Link Stagger */
[data-animate="nav-link"] {
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                transform var(--duration-normal) var(--ease-out-expo);
}

[data-animate="nav-link"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nav CTA Button */
[data-animate="nav-cta"] {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    transition: opacity var(--duration-normal) var(--ease-out-back),
                transform var(--duration-normal) var(--ease-out-back);
}

[data-animate="nav-cta"].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile Menu */
.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-smooth),
                visibility var(--duration-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

html[dir="rtl"] .mobile-menu-content {
    transform: translateX(-100%);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

/* Hamburger Animation */
.mobile-menu-toggle {
    position: relative;
    width: 30px;
    height: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--mirad-blue-dark);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-line:nth-child(3) { bottom: 0; }

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu Items Stagger */
.mobile-menu .menu-item {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                transform var(--duration-normal) var(--ease-out-expo);
}

html[dir="rtl"] .mobile-menu .menu-item {
    transform: translateX(-30px);
}

.mobile-menu-overlay.active .mobile-menu .menu-item {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(6) { transition-delay: 0.35s; }

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section,
.page-hero,
.home-hero {
    position: relative;
    overflow: hidden;
}

/* Hero Background Parallax */
[data-hero-parallax] {
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    will-change: background-position;
}

@media (max-width: 768px) {
    [data-hero-parallax] {
        background-attachment: scroll;
    }
}

/* Hero Ken Burns Effect */
.hero-section.has-ken-burns .hero-background img,
.hero-section.has-ken-burns .hero-image,
.hero-section.has-ken-burns {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

/* Ensure hero background covers full viewport */
.hero-section,
.home-hero,
.page-hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Full viewport hero for video/image backgrounds */
.hero-section[style*="background-image"],
.home-hero[style*="background-image"] {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Hero Overlay Gradient Animation */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(40, 80, 112, 0.45) 0%,
        rgba(26, 58, 77, 0.35) 50%,
        rgba(40, 80, 112, 0.45) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    z-index: 2;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--mirad-gold-1);
    font-weight: 600;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--mirad-gold-1);
    opacity: 0.6;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* Hero Title Gradient Text */
.hero-title.has-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--mirad-gold-2) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--mirad-gold-2);
    opacity: 0.95;
    line-height: 1.8;
    font-family: var(--mirad-font-secondary);
}

.hero-tagline {
    font-family: var(--mirad-font-secondary);
    font-size: 1.5rem;
    color: var(--mirad-gold-1);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Hero Underline */
.hero-underline {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
    margin: 1.2rem auto 0;
    transform-origin: center;
    transform: scaleX(0);
    transition: transform var(--mirad-hero-underline-duration) var(--ease-out-expo);
}

.hero-underline.is-visible {
    transform: scaleX(1);
}

html[dir="rtl"] .hero-underline {
    transform-origin: center;
}

/* Hero Particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--mirad-gold-1);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 15s ease-in-out infinite;
}

.hero-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-particle:nth-child(2) { left: 20%; top: 80%; animation-delay: 2s; }
.hero-particle:nth-child(3) { left: 60%; top: 40%; animation-delay: 4s; }
.hero-particle:nth-child(4) { left: 80%; top: 60%; animation-delay: 6s; }
.hero-particle:nth-child(5) { left: 90%; top: 10%; animation-delay: 8s; }

/* =============================================
   BUTTONS & CTAs
   ============================================= */

.mirad-btn,
.header-cta-button {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all var(--duration-normal) var(--ease-out-expo);
    z-index: 1;
}

/* Button Ripple Effect */
.mirad-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.mirad-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Primary Button */
.mirad-btn-primary,
.header-cta-button {
    background: linear-gradient(135deg, var(--mirad-blue-dark) 0%, #1f3f59 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(40, 80, 112, 0.3);
}

.mirad-btn-primary:hover,
.header-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 80, 112, 0.4);
}

.mirad-btn-primary:active,
.header-cta-button:active {
    transform: translateY(-1px);
}

/* Secondary Button */
.mirad-btn-secondary {
    background: transparent;
    color: var(--mirad-blue-dark);
    border: 2px solid var(--mirad-gold-1);
    position: relative;
}

.mirad-btn-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--mirad-gold-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--duration-normal) var(--ease-out-expo);
    z-index: -1;
}

html[dir="rtl"] .mirad-btn-secondary::after {
    transform-origin: left;
}

.mirad-btn-secondary:hover {
    color: var(--mirad-blue-dark);
}

.mirad-btn-secondary:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

html[dir="rtl"] .mirad-btn-secondary:hover::after {
    transform-origin: right;
}

/* Gold CTA Button with Shimmer */
.mirad-btn-gold {
    background: linear-gradient(
        90deg,
        var(--mirad-gold-1) 0%,
        var(--mirad-gold-2) 25%,
        var(--mirad-gold-1) 50%,
        var(--mirad-gold-2) 75%,
        var(--mirad-gold-1) 100%
    );
    background-size: 200% auto;
    color: var(--mirad-blue-dark);
    border: none;
    font-weight: 700;
    animation: goldShimmer 3s linear infinite;
}

.mirad-btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 184, 105, 0.5);
}

/* Button with Glow */
.mirad-btn-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Button Loading State */
.mirad-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

.mirad-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

/* =============================================
   CARDS & COMPONENTS
   ============================================= */

/* Project Card */
.project-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(40, 80, 112, 0.08);
    box-shadow: 0 10px 40px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(40, 80, 112, 0.15);
    border-color: var(--mirad-gold-1);
}

/* Card 3D Tilt Effect */
.project-card.has-tilt {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Card Image */
.project-card-image,
.project-image {
    position: relative;
    overflow: hidden;
}

.project-card-image img,
.project-image img {
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

.project-card:hover .project-card-image img,
.project-card:hover .project-image img {
    transform: scale(1.08);
}

/* Card Image Overlay */
.project-card-image::after,
.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(40, 80, 112, 0.8) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-smooth);
}

.project-card:hover .project-card-image::after,
.project-card:hover .project-image::after {
    opacity: 1;
}

/* Card Content */
.project-card-content,
.project-content {
    padding: 1.5rem;
}

.project-card-title a {
    background: linear-gradient(to right, var(--mirad-gold-1), var(--mirad-gold-1));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size var(--duration-normal) var(--ease-out-expo),
                color var(--duration-fast) var(--ease-smooth);
}

.project-card:hover .project-card-title a {
    background-size: 100% 2px;
    color: var(--mirad-gold-1);
}

/* Card Button Magnetic Effect */
.project-card-button {
    position: relative;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.project-card:hover .project-card-button {
    transform: translateX(5px);
}

html[dir="rtl"] .project-card:hover .project-card-button {
    transform: translateX(-5px);
}

/* News Card */
.news-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(40, 80, 112, 0.08);
    box-shadow: 0 10px 40px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(40, 80, 112, 0.15);
    border-color: var(--mirad-gold-1);
}

.news-card .news-image img {
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(40, 80, 112, 0.08);
    box-shadow: 0 10px 40px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(40, 80, 112, 0.12);
    border-color: var(--mirad-gold-3);
}

/* Testimonial Quote Icon */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: var(--mirad-gold-1);
    opacity: 0.15;
    line-height: 1;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

html[dir="rtl"] .testimonial-card::before {
    right: auto;
    left: 25px;
}

.testimonial-card:hover::before {
    opacity: 0.3;
    transform: scale(1.1);
}

/* Testimonial Avatar */
.testimonial-avatar img {
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.testimonial-card:hover .testimonial-avatar img {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--mirad-gold-1);
}

/* Star Rating Animation */
.testimonial-rating .star {
    display: inline-block;
    transition: transform var(--duration-fast) var(--ease-out-back);
}

.testimonial-card:hover .testimonial-rating .star {
    animation: bounce 0.4s ease;
}

.testimonial-card:hover .testimonial-rating .star:nth-child(1) { animation-delay: 0s; }
.testimonial-card:hover .testimonial-rating .star:nth-child(2) { animation-delay: 0.05s; }
.testimonial-card:hover .testimonial-rating .star:nth-child(3) { animation-delay: 0.1s; }
.testimonial-card:hover .testimonial-rating .star:nth-child(4) { animation-delay: 0.15s; }
.testimonial-card:hover .testimonial-rating .star:nth-child(5) { animation-delay: 0.2s; }

/* Feature Card */
.feature-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(40, 80, 112, 0.08);
    box-shadow: 0 10px 40px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

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

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(40, 80, 112, 0.12);
}

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

/* Feature Icon */
.feature-icon {
    transition: all var(--duration-normal) var(--ease-out-back);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--mirad-gold-1);
    color: #fff;
}

/* Stat Item */
.stat-item {
    position: relative;
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(40, 80, 112, 0.08);
    box-shadow: 0 10px 40px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(40, 80, 112, 0.12);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--mirad-blue-dark);
    line-height: 1;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
    color: var(--mirad-gold-1);
}

/* Info Item Card */
.info-item {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(40, 80, 112, 0.12);
    box-shadow: 0 10px 30px rgba(40, 80, 112, 0.08);
    transition: all var(--duration-normal) var(--ease-out-expo);
    text-align: center;
}

.info-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(40, 80, 112, 0.15);
    border-color: var(--mirad-gold-1);
}

/* =============================================
   GLASSMORPHISM COMPONENTS
   ============================================= */

.glass-card {
    background: var(--glass-bg-light);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.glass-dark {
    background: rgba(40, 80, 112, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */

.mirad-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--mirad-gold-1);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s var(--ease-out-expo),
                height 0.2s var(--ease-out-expo),
                border-color 0.2s,
                background-color 0.2s,
                opacity 0.3s;
    z-index: 99999;
    opacity: 0;
    mix-blend-mode: difference;
}

.mirad-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--mirad-gold-1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s var(--ease-out-expo);
}

.mirad-cursor.is-visible {
    opacity: 1;
}

.mirad-cursor.is-hover {
    width: 60px;
    height: 60px;
    border-color: var(--mirad-gold-1);
    background: rgba(229, 184, 105, 0.1);
}

.mirad-cursor.is-hover::after {
    width: 0;
    height: 0;
}

.mirad-cursor.is-clicking {
    transform: translate(-50%, -50%) scale(0.8);
}

.mirad-cursor.is-hidden {
    opacity: 0;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .mirad-cursor {
        display: none !important;
    }
}

/* =============================================
   SCROLL PROGRESS INDICATOR
   ============================================= */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--mirad-blue-dark);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--duration-normal) var(--ease-out-expo);
    box-shadow: 0 4px 20px rgba(40, 80, 112, 0.3);
    z-index: 999;
}

html[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--mirad-gold-1);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(229, 184, 105, 0.4);
}

.back-to-top:hover svg {
    animation: bounce 0.5s ease;
}

/* =============================================
   FORM ANIMATIONS
   ============================================= */

/* Floating Labels */
.mirad-form-field {
    position: relative;
}

.mirad-form-field.has-floating-label label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    transition: all var(--duration-fast) var(--ease-out-expo);
    pointer-events: none;
    color: var(--mirad-blue-light);
    background: #fff;
    padding: 0 0.5rem;
}

html[dir="rtl"] .mirad-form-field.has-floating-label label {
    left: auto;
    right: 1rem;
}

.mirad-form-field.has-floating-label input:focus + label,
.mirad-form-field.has-floating-label input:not(:placeholder-shown) + label,
.mirad-form-field.has-floating-label textarea:focus + label,
.mirad-form-field.has-floating-label textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.8rem;
    color: var(--mirad-gold-1);
}

/* Input Focus Glow */
.mirad-input:focus,
.mirad-textarea:focus,
.mirad-select:focus {
    outline: none;
    border-color: var(--mirad-gold-1);
    box-shadow: 0 0 0 4px rgba(229, 184, 105, 0.15);
}

/* Form Success/Error States */
.mirad-input.is-valid {
    border-color: #28a745;
    animation: pulseGlow 1s ease;
}

.mirad-input.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease;
}

/* =============================================
   SECTION DIVIDERS
   ============================================= */

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
    margin: 20px auto;
    border-radius: 999px;
    transform: scaleX(0);
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

.section-divider.is-visible {
    transform: scaleX(1);
}

/* Animated SVG Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider .shape-fill {
    fill: #fff;
}

/* =============================================
   GALLERY LIGHTBOX
   ============================================= */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-smooth);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.9);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-out-back);
}

.lightbox-overlay.active img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out-expo);
}

html[dir="rtl"] .lightbox-close {
    right: auto;
    left: 2rem;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    background: var(--mirad-gold-1);
}

/* Gallery Item Hover */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform var(--duration-slow) var(--ease-out-expo);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 80, 112, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-smooth);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay svg,
.gallery-overlay span {
    color: #fff;
    font-size: 2rem;
    transform: scale(0.5);
    transition: transform var(--duration-normal) var(--ease-out-back);
}

.gallery-item:hover .gallery-overlay svg,
.gallery-item:hover .gallery-overlay span {
    transform: scale(1);
}

/* =============================================
   CTA SECTION
   ============================================= */

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(40, 80, 112, 0.92) 0%,
        rgba(26, 58, 77, 0.88) 50%,
        rgba(40, 80, 112, 0.92) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    color: #fff;
}

.cta-description {
    color: rgba(255, 255, 255, 0.9);
}

/* =============================================
   FOOTER ANIMATIONS
   ============================================= */

.footer-menu a {
    position: relative;
    display: inline-block;
}

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--mirad-gold-1);
    transition: width var(--duration-normal) var(--ease-out-expo);
}

html[dir="rtl"] .footer-menu a::after {
    left: auto;
    right: 0;
}

.footer-menu a:hover::after {
    width: 100%;
}

/* Social Icons */
.footer-social-icons .social-icon {
    transition: all var(--duration-normal) var(--ease-out-back);
}

.footer-social-icons .social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--mirad-gold-1);
    box-shadow: 0 10px 25px rgba(229, 184, 105, 0.4);
}

/* =============================================
   LOADING STATES
   ============================================= */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(40, 80, 112, 0.08) 25%,
        rgba(40, 80, 112, 0.15) 50%,
        rgba(40, 80, 112, 0.08) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-image {
    height: 200px;
    border-radius: 12px;
}

/* Page Transition */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--mirad-blue-dark);
    z-index: 100000;
    transform: translateY(100%);
    transition: transform 0.6s var(--ease-in-out-circ);
}

.page-transition.is-active {
    transform: translateY(0);
}

/* =============================================
   REDUCED MOTION SUPPORT
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    
    .mirad-cursor {
        display: none !important;
    }
    
    .hero-overlay {
        animation: none;
    }
    
    .scroll-progress {
        display: none;
    }
}

/* =============================================
   MOBILE OPTIMIZATIONS
   ============================================= */

@media screen and (max-width: 768px) {
    /* Simpler animations on mobile */
    [data-animate] {
        transform: translateY(20px) !important;
    }
    
    [data-animate="fade-left"],
    [data-animate="fade-right"] {
        transform: translateY(20px) !important;
    }
    
    [data-animate].is-visible {
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Faster animations on mobile */
    :root {
        --mirad-reveal-duration: 0.6s;
        --mirad-stagger-delay: 0.05s;
    }
    
    /* Hide custom cursor on mobile */
    .mirad-cursor {
        display: none !important;
    }
    
    /* Disable parallax on mobile */
    [data-parallax] {
        transform: none !important;
    }
    
    /* Simpler hero effects */
    .hero-particles {
        display: none;
    }
    
    .hero-overlay {
        animation: none;
        background: linear-gradient(135deg, rgba(40, 80, 112, 0.4), rgba(26, 58, 77, 0.5));
    }
}

/* =============================================
   TABLET OPTIMIZATIONS
   ============================================= */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* Moderate animations on tablet */
    :root {
        --mirad-reveal-duration: 0.8s;
    }
    
    /* Hide custom cursor on tablet touch devices */
    .mirad-cursor {
        display: none;
    }
}

/* =============================================
   LARGE DESKTOP OPTIMIZATIONS
   ============================================= */

@media screen and (min-width: 1440px) {
    /* Full animations on large screens */
    :root {
        --mirad-reveal-duration: 1s;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
    [data-animate],
    .mirad-cursor,
    .scroll-progress,
    .back-to-top,
    .hero-particles {
        display: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* =============================================
   FORCE VISIBILITY FALLBACK
   If animations don't trigger after page load
   ============================================= */

/* This ensures content is always visible even if JS fails */
html.animations-loaded [data-animate]:not(.is-visible) {
    animation: forceShow 0.01s 4s forwards;
}

@keyframes forceShow {
    to {
        opacity: 1;
        transform: none;
    }
}

/* =============================================
   🔥 PREMIUM MOBILE ANIMATIONS 🔥
   Award-winning mobile experience
   ============================================= */

/* ===== NEW KEYFRAMES FOR MOBILE ===== */

/* Smooth Slide Up with Bounce */
@keyframes mobileSlideUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Elegant Fade Scale */
@keyframes mobileFadeScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Staggered Reveal */
@keyframes mobileStaggerReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Glow Pulse */
@keyframes mobileGlowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(229, 184, 105, 0.4);
    }
    50% {
        box-shadow: 0 0 30px 10px rgba(229, 184, 105, 0.2);
    }
}

/* Text Reveal Line by Line */
@keyframes mobileTextReveal {
    0% {
        opacity: 0;
        transform: translateY(100%);
        clip-path: inset(0 0 100% 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

/* Card Float */
@keyframes mobileCardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Shimmer Effect */
@keyframes mobileShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Border Draw */
@keyframes mobileBorderDraw {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Icon Bounce */
@keyframes mobileIconBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.05);
    }
}

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

/* Gradient Flow */
@keyframes mobileGradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Typewriter Cursor */
@keyframes mobileCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Shake Attention */
@keyframes mobileShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== MOBILE-SPECIFIC STYLES ===== */

@media screen and (max-width: 991px) {
    
    /* ===== HERO SECTION - MOBILE ===== */
    .home-hero,
    .hero-section {
        position: relative;
        overflow: hidden;
    }
    
    /* Hero Content Animation */
    .hero-content {
        animation: mobileFadeScale 1s var(--ease-out-expo) forwards;
    }
    
    /* Hero Title - Dramatic Entrance */
    .hero-title {
        animation: mobileSlideUp 1s var(--ease-out-expo) 0.2s both;
        text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    }
    
    /* Hero Subtitle */
    .hero-subtitle {
        animation: mobileSlideUp 1s var(--ease-out-expo) 0.4s both;
    }
    
    /* Hero Eyebrow with Shimmer */
    .hero-eyebrow {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) 0.1s both;
        position: relative;
        overflow: hidden;
    }
    
    .hero-eyebrow::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent
        );
        animation: mobileShimmer 3s infinite;
    }
    
    /* Hero CTA Button - Glow Effect */
    .hero-content .mirad-btn {
        animation: mobileSlideUp 1s var(--ease-out-expo) 0.6s both,
                   mobileGlowPulse 2s ease-in-out 1.5s infinite;
        position: relative;
        overflow: hidden;
    }
    
    .hero-content .mirad-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    
    .hero-content .mirad-btn:active::before {
        width: 300px;
        height: 300px;
    }
    
    /* Hero Underline Animation */
    .hero-underline {
        animation: scaleX 1.2s var(--ease-out-expo) 0.8s both;
        transform-origin: center;
    }
    
    /* ===== CARDS - MOBILE ===== */
    
    /* Project Cards */
    .project-card {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
        transition: transform 0.4s var(--ease-out-expo), 
                    box-shadow 0.4s var(--ease-out-expo);
    }
    
    .project-card:active {
        transform: scale(0.98);
        box-shadow: 0 5px 20px rgba(40, 80, 112, 0.2);
    }
    
    /* Stagger Cards */
    .projects-grid .project-card:nth-child(1) { animation-delay: 0.1s; }
    .projects-grid .project-card:nth-child(2) { animation-delay: 0.2s; }
    .projects-grid .project-card:nth-child(3) { animation-delay: 0.3s; }
    .projects-grid .project-card:nth-child(4) { animation-delay: 0.4s; }
    .projects-grid .project-card:nth-child(5) { animation-delay: 0.5s; }
    .projects-grid .project-card:nth-child(6) { animation-delay: 0.6s; }
    
    /* Card Image Hover Effect */
    .project-card-image {
        overflow: hidden;
    }
    
    .project-card-image img {
        transition: transform 0.6s var(--ease-out-expo);
    }
    
    .project-card:active .project-card-image img {
        transform: scale(1.1);
    }
    
    /* News Cards */
    .news-card {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
        position: relative;
        overflow: hidden;
    }
    
    .news-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--mirad-gold-1), var(--mirad-gold-3));
        transition: left 0.5s var(--ease-out-expo);
    }
    
    .news-card:active::before {
        left: 0;
    }
    
    /* ===== SECTION HEADERS - MOBILE ===== */
    
    .section-header,
    .section-title {
        animation: mobileTextReveal 0.8s var(--ease-out-expo) both;
    }
    
    .section-subtitle {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) 0.2s both;
    }
    
    /* ===== BUTTONS - MOBILE ===== */
    
    .mirad-btn {
        position: relative;
        overflow: hidden;
        transition: all 0.3s var(--ease-out-expo);
    }
    
    /* Ripple Effect on Touch */
    .mirad-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    
    .mirad-btn:active::after {
        animation: mobileRipple 0.6s ease-out;
    }
    
    .mirad-btn:active {
        transform: scale(0.95);
    }
    
    /* ===== STATS SECTION - MOBILE ===== */
    
    .stat-item {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
    }
    
    .stat-item:nth-child(1) { animation-delay: 0.1s; }
    .stat-item:nth-child(2) { animation-delay: 0.2s; }
    .stat-item:nth-child(3) { animation-delay: 0.3s; }
    .stat-item:nth-child(4) { animation-delay: 0.4s; }
    
    .stat-number {
        background: linear-gradient(135deg, var(--mirad-gold-1), var(--mirad-gold-3));
        background-size: 200% 200%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: mobileGradientFlow 3s ease infinite;
    }
    
    /* ===== TESTIMONIALS - MOBILE ===== */
    
    .testimonial-card {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
        position: relative;
    }
    
    .testimonial-card::before {
        content: '"';
        position: absolute;
        top: -20px;
        left: 20px;
        font-size: 80px;
        font-family: Georgia, serif;
        color: var(--mirad-gold-1);
        opacity: 0.3;
        line-height: 1;
    }
    
    /* ===== WHY US SECTION - MOBILE ===== */
    
    .feature-card,
    .why-us-item {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
        transition: transform 0.3s var(--ease-out-expo);
    }
    
    .feature-card:active,
    .why-us-item:active {
        transform: translateY(-5px);
    }
    
    .feature-card:nth-child(1) { animation-delay: 0.1s; }
    .feature-card:nth-child(2) { animation-delay: 0.2s; }
    .feature-card:nth-child(3) { animation-delay: 0.3s; }
    .feature-card:nth-child(4) { animation-delay: 0.4s; }
    
    /* Feature Icon Animation */
    .feature-icon,
    .why-us-icon {
        animation: mobileIconBounce 0.6s var(--ease-out-back) both;
    }
    
    /* ===== CONTACT FORM - MOBILE ===== */
    
    .contact-form {
        animation: mobileFadeScale 0.8s var(--ease-out-expo) both;
    }
    
    .form-group {
        animation: mobileSlideUp 0.6s var(--ease-out-expo) both;
    }
    
    .form-group:nth-child(1) { animation-delay: 0.1s; }
    .form-group:nth-child(2) { animation-delay: 0.15s; }
    .form-group:nth-child(3) { animation-delay: 0.2s; }
    .form-group:nth-child(4) { animation-delay: 0.25s; }
    .form-group:nth-child(5) { animation-delay: 0.3s; }
    
    /* Input Focus Animation */
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        transform: scale(1.02);
        box-shadow: 0 0 0 3px rgba(229, 184, 105, 0.3);
    }
    
    /* Submit Button */
    .contact-form .mirad-btn[type="submit"] {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) 0.4s both;
    }
    
    /* ===== FOOTER - MOBILE ===== */
    
    .site-footer {
        position: relative;
        overflow: hidden;
    }
    
    .footer-col {
        animation: mobileSlideUp 0.8s var(--ease-out-expo) both;
    }
    
    .footer-col:nth-child(1) { animation-delay: 0.1s; }
    .footer-col:nth-child(2) { animation-delay: 0.2s; }
    .footer-col:nth-child(3) { animation-delay: 0.3s; }
    
    /* Social Icons */
    .footer-social-icons .social-icon {
        animation: mobileSlideUp 0.6s var(--ease-out-back) both;
        transition: transform 0.3s var(--ease-out-back);
    }
    
    .footer-social-icons .social-icon:nth-child(1) { animation-delay: 0.3s; }
    .footer-social-icons .social-icon:nth-child(2) { animation-delay: 0.4s; }
    .footer-social-icons .social-icon:nth-child(3) { animation-delay: 0.5s; }
    .footer-social-icons .social-icon:nth-child(4) { animation-delay: 0.6s; }
    
    .footer-social-icons .social-icon:active {
        transform: scale(1.2);
    }
    
    /* ===== MOBILE MENU ANIMATIONS ===== */
    
    .mobile-menu-overlay {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mobile-menu-content {
        animation: none;
    }
    
    .mobile-menu-overlay.active .mobile-menu-content {
        animation: mobileSlideIn 0.4s var(--ease-out-expo) forwards;
    }
    
    @keyframes mobileSlideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
    html[dir="rtl"] .mobile-menu-overlay.active .mobile-menu-content {
        animation: mobileSlideInRTL 0.4s var(--ease-out-expo) forwards;
    }
    
    @keyframes mobileSlideInRTL {
        from {
            transform: translateX(-100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
    /* Mobile Menu Items Stagger */
    .mobile-menu .menu-item {
        animation: mobileSlideUp 0.5s var(--ease-out-expo) both;
        opacity: 0;
    }
    
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(1) { animation-delay: 0.1s; }
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(2) { animation-delay: 0.15s; }
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(3) { animation-delay: 0.2s; }
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(4) { animation-delay: 0.25s; }
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(5) { animation-delay: 0.3s; }
    .mobile-menu-overlay.active .mobile-menu .menu-item:nth-child(6) { animation-delay: 0.35s; }
    
    /* Mobile Logo Animation */
    .mobile-menu-overlay.active .mobile-logo {
        animation: mobileFadeScale 0.6s var(--ease-out-expo) 0.05s both;
    }
    
    /* Mobile CTA Animation */
    .mobile-menu-overlay.active .mobile-menu-cta {
        animation: mobileSlideUp 0.6s var(--ease-out-expo) 0.4s both;
    }
    
    /* Mobile Language Switcher */
    .mobile-menu-overlay.active .mobile-language-switcher {
        animation: mobileSlideUp 0.6s var(--ease-out-expo) 0.5s both;
    }
    
    /* ===== SCROLL ANIMATIONS - MOBILE ===== */
    
    /* Scroll Indicator */
    .scroll-indicator {
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 50px;
        border: 2px solid var(--mirad-gold-1);
        border-radius: 25px;
        opacity: 0;
        animation: fadeIn 1s 2s forwards;
        z-index: 100;
    }
    
    .scroll-indicator::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 6px;
        height: 6px;
        background: var(--mirad-gold-1);
        border-radius: 50%;
        transform: translateX(-50%);
        animation: scrollBounce 2s infinite;
    }
    
    @keyframes scrollBounce {
        0%, 100% { top: 8px; opacity: 1; }
        50% { top: 32px; opacity: 0.3; }
    }
    
    /* Hide scroll indicator after scroll */
    .scrolled .scroll-indicator {
        opacity: 0;
        pointer-events: none;
    }
    
    /* ===== PAGE TRANSITIONS - MOBILE ===== */
    
    .page-loading {
        position: fixed;
        inset: 0;
        background: var(--mirad-blue-dark);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.5s, visibility 0.5s;
    }
    
    .page-loading.loaded {
        opacity: 0;
        visibility: hidden;
    }
    
    .page-loading-spinner {
        width: 50px;
        height: 50px;
        border: 3px solid rgba(229, 184, 105, 0.2);
        border-top-color: var(--mirad-gold-1);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* ===== PULL TO REFRESH STYLE ===== */
    
    .pull-indicator {
        position: fixed;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        background: var(--mirad-gold-1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(229, 184, 105, 0.4);
        transition: top 0.3s;
        z-index: 1000;
    }
    
    .pull-indicator svg {
        width: 24px;
        height: 24px;
        fill: white;
        transition: transform 0.3s;
    }
    
    .pulling .pull-indicator {
        top: 20px;
    }
    
    .pulling .pull-indicator svg {
        transform: rotate(180deg);
    }
    
    /* ===== TOUCH FEEDBACK ===== */
    
    /* Universal Touch Feedback */
    a, button, .clickable {
        -webkit-tap-highlight-color: rgba(229, 184, 105, 0.2);
        touch-action: manipulation;
    }
    
    /* Active States */
    a:active, button:active, .clickable:active {
        opacity: 0.8;
    }
    
    /* ===== GALLERY - MOBILE ===== */
    
    .gallery-item {
        animation: mobileFadeScale 0.6s var(--ease-out-expo) both;
    }
    
    .gallery-item:nth-child(1) { animation-delay: 0.1s; }
    .gallery-item:nth-child(2) { animation-delay: 0.15s; }
    .gallery-item:nth-child(3) { animation-delay: 0.2s; }
    .gallery-item:nth-child(4) { animation-delay: 0.25s; }
    .gallery-item:nth-child(5) { animation-delay: 0.3s; }
    .gallery-item:nth-child(6) { animation-delay: 0.35s; }
    
    .gallery-item:active {
        transform: scale(0.95);
    }
    
    /* ===== SWIPE HINT ===== */
    
    .swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 15px;
        color: var(--mirad-blue-light);
        font-size: 0.85rem;
        animation: swipeHint 2s ease-in-out infinite;
    }
    
    .swipe-hint svg {
        width: 20px;
        height: 20px;
    }
    
    @keyframes swipeHint {
        0%, 100% { transform: translateX(0); opacity: 0.5; }
        50% { transform: translateX(10px); opacity: 1; }
    }
    
    html[dir="rtl"] .swipe-hint {
        animation: swipeHintRTL 2s ease-in-out infinite;
    }
    
    @keyframes swipeHintRTL {
        0%, 100% { transform: translateX(0); opacity: 0.5; }
        50% { transform: translateX(-10px); opacity: 1; }
    }
    
}

/* ===== EXTRA SMALL MOBILE (375px and below) ===== */

@media screen and (max-width: 375px) {
    .hero-title {
        animation-delay: 0.1s;
    }
    
    .hero-subtitle {
        animation-delay: 0.2s;
    }
    
    .hero-content .mirad-btn {
        animation-delay: 0.3s;
    }
    
    /* Smaller animations for performance */
    @keyframes mobileSlideUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===== LANDSCAPE MOBILE ===== */

@media screen and (max-width: 896px) and (orientation: landscape) {
    .hero-content {
        animation-duration: 0.6s;
    }
    
    .hero-title,
    .hero-subtitle {
        animation-duration: 0.5s;
    }
    
    /* Faster animations in landscape */
    :root {
        --mirad-reveal-duration: 0.5s;
        --mirad-stagger-delay: 0.03s;
    }
}

/* ===== TOUCH ACTIVE STATES ===== */

.is-touch-active {
    transform: scale(0.97) !important;
    opacity: 0.9;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.project-card.is-touch-active {
    box-shadow: 0 5px 25px rgba(40, 80, 112, 0.25);
}

.news-card.is-touch-active {
    border-color: var(--mirad-gold-1);
}

.feature-card.is-touch-active,
.why-us-item.is-touch-active {
    background: rgba(229, 184, 105, 0.1);
}

.stat-item.is-touch-active {
    transform: scale(1.05) !important;
}

.mirad-btn.is-touch-active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== VISIBLE STATE FOR CARDS ===== */

.project-card,
.news-card,
.testimonial-card,
.feature-card,
.why-us-item,
.stat-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out-expo), 
                transform 0.6s var(--ease-out-expo),
                box-shadow 0.3s ease;
}

.project-card.is-visible,
.news-card.is-visible,
.testimonial-card.is-visible,
.feature-card.is-visible,
.why-us-item.is-visible,
.stat-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure cards are visible if JS fails */
.no-js .project-card,
.no-js .news-card,
.no-js .testimonial-card,
.no-js .feature-card,
.no-js .why-us-item,
.no-js .stat-item {
    opacity: 1;
    transform: none;
}

/* Force show after animations loaded */
html.animations-loaded .project-card,
html.animations-loaded .news-card,
html.animations-loaded .testimonial-card,
html.animations-loaded .feature-card,
html.animations-loaded .why-us-item,
html.animations-loaded .stat-item {
    animation: mobileSlideUp 0.8s var(--ease-out-expo) forwards;
}

/* =============================================
   🚨 CRITICAL MOBILE FIXES 🚨
   Logo visibility & Counter fixes
   ============================================= */

/* FORCE LOGO VISIBILITY ON ALL SCREENS */
.header-logo,
.header-logo[data-animate],
.header-logo[data-animate="nav-logo"],
[data-animate="nav-logo"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.header-logo img,
.header-logo .custom-logo,
.custom-logo-link,
.custom-logo-link img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* MOBILE SPECIFIC - Maximum Priority */
@media screen and (max-width: 991px) {
    /* Force logo visible */
    .site-header .header-logo,
    .site-header .header-logo[data-animate],
    .site-header [data-animate="nav-logo"],
    .header-container .header-logo {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
    }
    
    .site-header .header-logo img,
    .site-header .header-logo .custom-logo,
    .header-container .header-logo img {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 45px !important;
        width: auto !important;
    }
    
    /* Stats - Force visibility */
    .stat-number,
    .stat-item .stat-number,
    .stats-section .stat-number {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Remove gap between header and hero */
    .site-main,
    .home-page,
    main#main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .hero-section:first-child,
    .home-hero:first-child {
        margin-top: 0 !important;
    }
}

/* SMALL MOBILE - Extra coverage */
@media screen and (max-width: 575px) {
    .site-header .header-logo img {
        max-height: 38px !important;
    }
}
