/**
 * UX Enhancements - Premium Dubai Theme
 * Advanced animations, micro-interactions, and visual polish
 * @package Betpro_Theme
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES FOR UX
   ========================================================================== */
:root {
    --ux-gold: #D4AF37;
    --ux-gold-light: #FFD700;
    --ux-gold-dark: #B8860B;
    --ux-transition-fast: 0.2s;
    --ux-transition-normal: 0.35s;
    --ux-transition-slow: 0.5s;
    --ux-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ux-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ux-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   SMOOTH SCROLLING & GLOBAL POLISH
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

* {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: var(--ux-gold);
    color: #000;
}

/* ==========================================================================
   PREMIUM BUTTON ANIMATIONS
   ========================================================================== */
/* Primary Button - Pulsing Glow */
.huzfp--btn-primary,
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.huzfp--btn-primary::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.huzfp--btn-primary:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

.huzfp--btn-primary:hover,
.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 10px 40px rgba(212, 175, 55, 0.4),
        0 0 20px rgba(212, 175, 55, 0.2);
}

.huzfp--btn-primary:active,
.btn-primary:active {
    transform: translateY(-2px) scale(1);
}

/* Secondary Button - Border Animation */
.huzfp--btn-secondary,
.btn-outline {
    position: relative;
    background: transparent;
    border: 2px solid rgba(212, 175, 55, 0.5);
    overflow: hidden;
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.huzfp--btn-secondary::after,
.btn-outline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--ux-gold), var(--ux-gold-dark));
    opacity: 0;
    transition: opacity var(--ux-transition-normal);
    z-index: -1;
}

.huzfp--btn-secondary:hover,
.btn-outline:hover {
    border-color: var(--ux-gold);
    color: #000;
}

.huzfp--btn-secondary:hover::after,
.btn-outline:hover::after {
    opacity: 1;
}

/* Glowing Button */
.huzfp--btn-glow {
    animation: subtle-pulse 2s ease-in-out infinite;
}

@keyframes subtle-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.2);
    }
}

/* ==========================================================================
   CARD HOVER EFFECTS - ENHANCED
   ========================================================================== */
/* Feature Cards - 3D Tilt Effect */
.huzfp--feature-card,
.huzfp--about-card,
.huzfp--account-card,
.huzfp--step-card,
.testimonial-card,
.pricing-card,
.risk-card {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
    will-change: transform, box-shadow;
}

.huzfp--feature-card:hover,
.huzfp--about-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(212, 175, 55, 0.1);
}

/* Stats Cards - Scale Pop */
.huzfp--stats-card {
    transition: all var(--ux-transition-normal) var(--ux-elastic);
}

.huzfp--stats-card:hover {
    transform: scale(1.08) translateY(-5px);
}

.huzfp--stats-card:hover .huzfp--stats-number {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.huzfp--stats-number {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

/* Testimonial Cards - Slide Up & Glow */
.testimonial-card:hover {
    transform: translateY(-15px);
    box-shadow:
        0 30px 60px rgba(212, 175, 55, 0.12),
        0 0 0 1px rgba(212, 175, 55, 0.3);
}

/* Pricing Cards - Premium Lift */
.pricing-card {
    transition: all var(--ux-transition-slow) var(--ux-smooth);
}

.pricing-card:hover {
    transform: translateY(-20px);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(212, 175, 55, 0.3);
}

.pricing-card.popular {
    transform: scale(1.03);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-15px);
    box-shadow:
        0 50px 100px rgba(212, 175, 55, 0.2),
        0 0 60px rgba(212, 175, 55, 0.15);
}

/* ==========================================================================
   SECTION TAG ANIMATIONS
   ========================================================================== */
.huzfp--section-tag,
.section-tag {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
    animation: tag-float 3s ease-in-out infinite;
}

@keyframes tag-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.huzfp--section-tag:hover,
.section-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   ICON ANIMATIONS
   ========================================================================== */
.huzfp--feature-icon,
.huzfp--about-icon,
.huzfp--step-icon,
.huzfp--dealer-avatar,
.huzfp--stats-icon {
    transition: all var(--ux-transition-normal) var(--ux-elastic);
}

.huzfp--feature-card:hover .huzfp--feature-icon,
.huzfp--about-card:hover svg,
.huzfp--step-card:hover .huzfp--step-icon {
    transform: scale(1.15) rotate(5deg);
}

.huzfp--dealer-card:hover .huzfp--dealer-avatar {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

/* Stats Icon Bounce */
.huzfp--stats-card:hover .huzfp--stats-icon {
    animation: icon-bounce 0.5s ease;
}

@keyframes icon-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(0.95);
    }

    75% {
        transform: scale(1.1);
    }
}

/* ==========================================================================
   TEXT HIGHLIGHT ANIMATIONS
   ========================================================================== */
.huzfp--highlight,
.highlight {
    background-size: 200% auto;
    animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

/* ==========================================================================
   STEP CARD CONNECTORS
   ========================================================================== */
.huzfp--step-card {
    position: relative;
}

.huzfp--steps-grid .huzfp--step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--ux-gold), transparent);
    opacity: 0.5;
}

.huzfp--step-number {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.huzfp--step-card:hover .huzfp--step-number {
    transform: scale(1.1);
    background: var(--ux-gold);
    color: #000;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   FAQ ACCORDION SMOOTH ANIMATION
   ========================================================================== */
.faq-item {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.faq-item:hover {
    transform: translateX(8px);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all var(--ux-transition-slow) var(--ux-smooth);
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    padding-top: 0;
    padding-bottom: 22px;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.huzfp--section,
.section {
    opacity: 1;
}

/* Fade In Up on Scroll - Add via JS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ux-smooth);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grids */
.reveal-stagger>*:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal-stagger>*:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal-stagger>*:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal-stagger>*:nth-child(4) {
    transition-delay: 0.4s;
}

.reveal-stagger>*:nth-child(5) {
    transition-delay: 0.5s;
}

.reveal-stagger>*:nth-child(6) {
    transition-delay: 0.6s;
}

/* ==========================================================================
   FLOATING ORBS - ENHANCED ANIMATION
   ========================================================================== */
.huzfp--floating-orb {
    animation: orb-float 15s ease-in-out infinite;
}

.huzfp--orb-1 {
    animation-delay: 0s;
}

.huzfp--orb-2 {
    animation-delay: -5s;
}

@keyframes orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
        opacity: 0.4;
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
        opacity: 0.5;
    }
}

/* ==========================================================================
   WHATSAPP BUTTON - ATTENTION GRABBING
   ========================================================================== */
.huzfp--whatsapp-btn {
    position: relative;
    overflow: hidden;
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.huzfp--whatsapp-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.huzfp--whatsapp-btn:hover::before {
    width: 300px;
    height: 300px;
}

.huzfp--whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   DEALER CARD - PREMIUM EFFECTS
   ========================================================================== */
.huzfp--dealer-card {
    transition: all var(--ux-transition-slow) var(--ux-smooth);
    position: relative;
    overflow: hidden;
}

.huzfp--dealer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(212, 175, 55, 0.1),
            transparent 30%);
    animation: rotate-glow 8s linear infinite;
    opacity: 0;
    transition: opacity var(--ux-transition-slow);
}

.huzfp--dealer-card:hover::before {
    opacity: 1;
}

@keyframes rotate-glow {
    100% {
        transform: rotate(360deg);
    }
}

.huzfp--dealer-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(212, 175, 55, 0.1);
}

.huzfp--dealer-stat {
    transition: all var(--ux-transition-fast) var(--ux-smooth);
}

.huzfp--dealer-stat:hover {
    transform: translateX(5px);
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
}

/* ==========================================================================
   COMPARISON TABLE - INTERACTIVE ROWS
   ========================================================================== */
.comparison-table tbody tr {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

.comparison-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
    transform: scale(1.01);
}

.comparison-table tbody tr:hover td {
    color: #fff;
}

.comparison-table tbody tr:hover td.highlight-col {
    background: rgba(212, 175, 55, 0.15);
}

/* ==========================================================================
   INPUT FOCUS STATES - PREMIUM
   ========================================================================== */
input,
textarea {
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--ux-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   LOADING SKELETON (for images)
   ========================================================================== */
.skeleton-loading {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   RESPONSIVE UX ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {

    /* Reduce motion for mobile */
    .huzfp--feature-card:hover,
    .huzfp--about-card:hover,
    .testimonial-card:hover,
    .pricing-card:hover {
        transform: translateY(-5px);
    }

    .huzfp--section-tag,
    .section-tag {
        animation: none;
    }

    /* Improve tap targets */
    .huzfp--btn-primary,
    .huzfp--btn-secondary,
    .btn-primary,
    .btn-outline {
        min-height: 48px;
        padding: 14px 28px;
    }

    .faq-item:hover {
        transform: none;
    }

    .huzfp--steps-grid .huzfp--step-card::after {
        display: none;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   CUSTOM SCROLLBAR - PREMIUM
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ux-gold-dark), var(--ux-gold));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ux-gold-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ux-gold) #0a0a0a;
}

/* ==========================================================================
   TOOLTIP STYLE (for future use)
   ========================================================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 8px 16px;
    background: var(--ux-gold);
    color: #000;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--ux-transition-normal) var(--ux-smooth);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}