/**
 * FinPal Hero Card Component
 *
 * A premium glassmorphic card with purple brand colors, gradient title, and background emoji.
 * Perfect for showcasing key features or value propositions.
 *
 * Usage:
 * <div class="finpal-hero-card" data-bg-emoji="🎯">
 *     <div class="finpal-hero-icon">🎯</div>
 *     <h1 class="finpal-hero-title">Your Card Title</h1>
 *     <p class="finpal-hero-description">Your description text...</p>
 * </div>
 *
 * Or use data-bg-emoji for different background emoji:
 * <div class="finpal-hero-card" data-bg-emoji="💰">
 *     <div class="finpal-hero-icon">🎯</div>
 *     ...
 * </div>
 *
 * Features:
 * - Purple-branded glassmorphic design
 * - Soft blue-to-pink gradient title
 * - Background emoji (bottom right, cut off)
 * - Smooth hover animation
 * - Fully responsive
 */

/* Main card container */
.finpal-hero-card {
    position: relative;
    max-width: 600px;
    padding: 3rem 2.5rem;
    border-radius: 28px;
    overflow: hidden;
    backdrop-filter: blur(24px) saturate(180%);
    background:
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(147, 51, 234, 0.12), transparent 45%),
        linear-gradient(135deg,
            rgba(168, 85, 247, 0.08) 0%,
            rgba(147, 51, 234, 0.06) 100%
        );
    border: none;
    box-shadow:
        0 0 1px 0.5px rgba(168, 85, 247, 0.4),
        0 0 20px rgba(168, 85, 247, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Traveling shimmer line on top border */
.finpal-hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(168, 85, 247, 0.6) 40%,
        rgba(192, 132, 252, 0.8) 50%,
        rgba(168, 85, 247, 0.6) 60%,
        transparent 100%);
    animation: travelingShimmer 3s infinite;
    opacity: 0.8;
    pointer-events: none;
    z-index: 10;
}

.finpal-hero-card:hover::after {
    opacity: 1;
}

@keyframes travelingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Background emoji - bottom right, cut off */
/* Now using .finpal-hero-bg-emoji class on a span element */
.finpal-hero-bg-emoji {
    content: attr(data-bg-emoji);
    position: absolute;
    bottom: -30px;
    right: -20px;
    font-size: 12rem;
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: rotate(0deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Rotation variants via data-bg-rotate attribute on card */
.finpal-hero-card[data-bg-rotate="15"] .finpal-hero-bg-emoji {
    transform: rotate(15deg);
}

.finpal-hero-card[data-bg-rotate="30"] .finpal-hero-bg-emoji {
    transform: rotate(30deg);
}

.finpal-hero-card[data-bg-rotate="45"] .finpal-hero-bg-emoji {
    transform: rotate(45deg);
}

.finpal-hero-card[data-bg-rotate="-15"] .finpal-hero-bg-emoji {
    transform: rotate(-15deg);
}

.finpal-hero-card[data-bg-rotate="-30"] .finpal-hero-bg-emoji {
    transform: rotate(-30deg);
}

.finpal-hero-card[data-bg-rotate="-45"] .finpal-hero-bg-emoji {
    transform: rotate(-45deg);
}

/* Purple gradient border with animated shimmer */
.finpal-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.6) 0%,
        rgba(147, 51, 234, 0.5) 50%,
        rgba(126, 34, 206, 0.6) 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}


/* Hover state - only when hover-animation is not disabled */
.finpal-hero-card:not([data-hover-animation="false"]):hover {
    transform: translateY(-8px);
    box-shadow:
        0 0 2px 1px rgba(168, 85, 247, 0.6),
        0 0 30px rgba(168, 85, 247, 0.25),
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Icon at top */
.finpal-hero-icon {
    position: relative;
    z-index: 1;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
    display: inline-block;
}

/* Icon hover animation - float up and scale - only when hover-animation is not disabled */
.finpal-hero-card:not([data-hover-animation="false"]):hover .finpal-hero-icon {
    transform: translateY(-8px) scale(1.1);
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.6));
}

/* Title with blue-to-pink gradient */
.finpal-hero-title {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: #ffffff !important;
    background: linear-gradient(90deg,
        #60a5fa 0%,
        #f472b6 100%
    );
    background-size: 100% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left !important;
}

/* Description text */
.finpal-hero-description {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .finpal-hero-card {
        padding: 2rem 1.5rem;
    }

    .finpal-hero-card::after {
        font-size: 10rem;
        bottom: -20px;
        right: -15px;
    }

    .finpal-hero-icon {
        font-size: 3rem;
    }

    .finpal-hero-title {
        font-size: 1.5rem;
    }

    .finpal-hero-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .finpal-hero-card {
        padding: 1.5rem 1.25rem;
    }

    .finpal-hero-card::after {
        font-size: 8rem;
        bottom: -15px;
        right: -10px;
    }

    .finpal-hero-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .finpal-hero-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .finpal-hero-description {
        font-size: 0.95rem;
    }
}
