/* IRANYekanX Variable Font Implementation */
@font-face {
    font-family: 'IRANYekanXVF';
    src: url('../fonts/iranyekanx/IRANYekanXVF.woff2') format('woff2-variations'),
        url('../fonts/iranyekanx/IRANYekanXVF.woff') format('woff-variations'),
        url('../fonts/iranyekanx/IRANYekanXVF.woff2') format('woff2'),
        url('../fonts/iranyekanx/IRANYekanXVF.woff') format('woff');
    font-weight: 100 900;
    font-display: fallback;
}

@font-face {
    font-family: 'IRANYekanX';
    src: url('../fonts/iranyekanx/static/IRANYekanX-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekanX';
    src: url('../fonts/iranyekanx/static/IRANYekanX-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'IRANYekanXVF', 'IRANYekanX', sans-serif;
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
}

/* Item 1: Fixed background optimization using hardware-accelerated pseudo-element */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, #1c1f26 0%, #0f1115 50%, #050608 100%) no-repeat;
    z-index: -2;
    pointer-events: none;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Highly Refined iOS Frosted Glass Effect */
.ios-glass {
    background: rgba(255, 255, 255, 0.03) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 1px 0px 1px rgba(255, 255, 255, 0.15), 0 15px 35px 0 rgba(0, 0, 0, 0.5) !important;
    transform: translateZ(0);
}

/* Premium Distinct Card Styled with Frosted Glassmorphism */
.premium-card {
    background: rgba(255, 255, 255, 0.04) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.6) !important;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

/* Item 2: Mobile performance optimization to eliminate backdrop-filter lag */
@media (max-width: 768px) {
    .ios-glass {
        background: rgba(15, 18, 25, 0.88) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    }
    
    .premium-card {
        background: rgba(20, 24, 32, 0.92) !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
    }
}

.premium-card:hover {
    border-color: rgba(223, 177, 91, 0.45) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(223, 177, 91, 0.08) !important;
    transform: translateY(-5px) scale(1.01);
}

/* Moving Glass Shine Effect */
.glass-hover-effect::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.glass-hover-effect:hover::after {
    left: 140%;
    opacity: 1;
}

/* Background Decorative Orbs for Glass Effect Enhancement */
/* Item 3: Hardware acceleration & mobile disabling for performance */
.glass-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    animation: orb-move 25s infinite alternate ease-in-out;
    will-change: transform;
    transform: translate3d(0, 0, 0); /* GPU Layer promotion */
}

@media (max-width: 768px) {
    .glass-orb {
        display: none !important; /* Hide resource-intensive blurred animations on mobile */
    }
}

@keyframes orb-move {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        transform: translate3d(100px, 80px, 0) scale(1.1);
    }
}

/* Carousel outline square control buttons */
.premium-carousel-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: #DFB15B;
}

.premium-carousel-btn:hover {
    background: rgba(223, 177, 91, 0.1);
    border-color: rgba(223, 177, 91, 0.4);
    color: #FFFFFF;
}

.press-effect {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, filter 0.3s ease;
}

.press-effect:hover {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.15) contrast(1.1);
    /* box-shadow: 0 10px 25px rgba(223, 177, 91, 0.35), 0 5px 10px rgba(0, 0, 0, 0.2); */
}

.press-effect:active {
    transform: translateY(0) scale(0.96);
    /* box-shadow: 0 2px 5px rgba(223, 177, 91, 0.15); */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Pure Red Soft Pulse for Live Stream Indicator */
@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.4;
    }

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

.pulse-live {
    animation: pulse-red 2s infinite ease-in-out;
}

@keyframes float-slow-1 {

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

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.2;
    }
}

@keyframes float-slow-2 {

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

    50% {
        transform: translateY(-15px) scale(0.95);
        opacity: 0.25;
    }
}

.float-particle-1 {
    animation: float-slow-1 8s infinite ease-in-out;
}

.float-particle-2 {
    animation: float-slow-2 10s infinite ease-in-out;
}

/* Advanced Scale-Up and Slide-Up Hero Transitions */
.hero-slide {
    opacity: 0;
    transform: scale(1.05) translateY(12px);
    transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Fixed hanging kativeh banner on desktop and mobile */
.hanging-kativeh {
    position: absolute;
    right: 12px;
    top: 0;
    width: 80px;
    /* Adjusted for better fit in header */
    height: 100px;
    background: rgba(35, 35, 35, 0.814) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(223, 177, 91, 0.45) !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    z-index: 60;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding-top: 8px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hanging-kativeh {
        right: 25px;
        width: 90px;
        height: 120px;
        padding-top: 14px;
        border-radius: 0 0 15px 15px;
    }
}

.hanging-kativeh:hover {
    height: 120px;
    border-color: rgba(223, 177, 91, 0.65);
}

@media (min-width: 768px) {
    .hanging-kativeh:hover {
        height: 130px;
    }
}

/* Mobile Drawer Styles */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 12, 20, 0.98);
    backdrop-filter: blur(20px);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Reveal on Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

/* Kativeh Drop-in Animation */
@keyframes kativeh-drop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.kativeh-drop-in {
    animation: kativeh-drop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    /* Hidden initially for delay */
}