/* Container */
.banner-container {
    position: relative;
    width: 100%;
    /* max-width: 1200px; */
    display: flex;
    justify-content: center;
    padding: 0 0 40px 0;
}

/* Backdrop overlay */
.banner-container .pill-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 60;
    pointer-events: none;
    overflow: visible;
}

.banner-container .pill-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Page-wide background sparkles */
.banner-container .background-bursts-page {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    user-select: none;
}

.banner-container .spark-page {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    transform: scale(var(--spark-scale, 1));
}

.banner-container .spark-ray-page {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.banner-container .ray-line-page {
    display: flex;
    align-items: center;
    gap: 2px;
}

.banner-container .ray-line-item-page {
    width: 16px;
    height: 3px;
    background: var(--spark-color, #818cf8);
    border-radius: 9999px;
    opacity: 0.95;
    box-shadow: 0 0 8px var(--spark-color, #818cf8);
}

.banner-container .ray-dot-page {
    width: 6px;
    height: 6px;
    background: var(--spark-color, #a78bfa);
    border-radius: 9999px;
    opacity: 1;
    box-shadow: 0 0 12px var(--spark-color, #a78bfa), 0 0 20px var(--spark-color, #a78bfa);
}

/* Interaction Wrapper */
.banner-container .interaction-wrapper {
    position: relative;
    z-index: 70;
    height: 46px;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

/* Floating Card / Pill Container */
.banner-container .pill-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
}

/* Show pill after page loads */
.banner-container .pill-container.loaded {
    animation: pillFadeIn 0.8s ease-out forwards;
}

@keyframes pillFadeIn {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(-10px);
    }

    100% {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.banner-container .pill-container.hovered {
    width: 90vw;
    max-width: 680px;
    height: 520px;
    border-radius: 40px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(248, 250, 252, 0.95) 25%,
            rgba(241, 245, 249, 0.98) 50%,
            rgba(248, 250, 252, 0.95) 75%,
            rgba(255, 255, 255, 0.98) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    box-shadow:
        0 25px 50px -12px rgba(99, 102, 241, 0.3),
        0 0 0 1px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.2);
    cursor: default;
    top: -90px;
    position: absolute;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: hidden;
}

.banner-container .pill-container.hovered::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 42px;
    background: linear-gradient(135deg,
            #7c3aed 0%,
            #6366f1 25%,
            #22d3ee 50%,
            #6366f1 75%,
            #7c3aed 100%);
    background-size: 300% 300%;
    animation: gradient-shift 6s ease infinite;
    opacity: 0.4;
    z-index: -1;
    filter: blur(1px);
}

/* Background & Borders for Pill Mode */
.banner-container .pill-background {
    position: absolute;
    inset: 0;
    transition: opacity 0.3s;
    opacity: 1;
    cursor: pointer;
}

.banner-container .pill-container.hovered .pill-background {
    opacity: 0;
}

.banner-container .outer-glow {
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    background: linear-gradient(to right, #7c3aed, #6366f1, #22d3ee);
    animation: subtle-pulse 3s ease-in-out infinite, gradient-shift 6s ease infinite;
    background-size: 200% 200%;
}

.banner-container .inner-border {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    /* Center-focused black & white, with existing brand colors at the edges */
    background: linear-gradient(to right,
            #7c3aed 0%,
            #6366f1 20%,
            #a87474 47%,
            #ffffffc9 50%,
            #a4b86a 53%,
            #22d3ee 80%,
            #7c3aed 100%);
    animation: gradient-shift 6s ease infinite;
    background-size: 200% 200%;
}

.banner-container .white-mask {
    position: absolute;
    inset: 1.5px;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
}

/* Content Wrapper */
.banner-container .pill-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    white-space: nowrap;
    transition: opacity 0.2s;
    opacity: 1;
}

.banner-container .pill-container.hovered .pill-content {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.banner-container .pill-text {
    background: linear-gradient(to right, #312e81, #1e293b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    letter-spacing: 0.025em;
}

.banner-container .cursor {
    width: 2px;
    height: 16px;
    background: #6366f1;
    margin-left: 4px;
    border-radius: 9999px;
}

.banner-container .cursor.blink {
    animation: blink 1s ease-in-out infinite;
}

/* Expanded Card Content */
.banner-container .card-content {
    position: absolute;
    inset: 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    transition: all 0.5s ease-out;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 10s ease infinite;
    border-radius: 40px;
}

.banner-container .pill-container.hovered .card-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0.1s;
}

/* Close Button */
.banner-container .card-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    color: #6366f1;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(10px);
}

.banner-container .pill-container.hovered .card-close-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition-delay: 0.2s;
}

.banner-container .card-close-btn:hover {
    background: linear-gradient(135deg,
            #6366f1 0%,
            #7c3aed 50%,
            #22d3ee 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    color: #fff;
    border-color: transparent;
    transform: scale(1.1) rotate(90deg);
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2);
}

.banner-container .card-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

.banner-container .card-close-btn svg {
    width: 22px;
    height: 22px;
}

/* Background Firecracker Bursts */
.banner-container .background-bursts {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.banner-container .spark {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
}

.banner-container .spark-ray {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.banner-container .ray-line {
    display: flex;
    align-items: center;
    gap: 1px;
}

.banner-container .ray-line-item {
    width: 8px;
    height: 1.5px;
    background: #818cf8;
    border-radius: 9999px;
    opacity: 0.9;
}

.banner-container .ray-dot {
    width: 2.5px;
    height: 2.5px;
    background: #a78bfa;
    border-radius: 9999px;
    opacity: 1;
}

.banner-container .card-title {
    position: relative;
    z-index: 10;
    font-size: 28px !important;
    font-weight: 700;
    background: linear-gradient(135deg,
            #312e81 0%,
            #6366f1 30%,
            #22d3ee 60%,
            #6366f1 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 5s ease infinite;
    margin-bottom: 24px;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
    letter-spacing: -0.02em;
}

@media (max-width: 991px) {
    .banner-container .card-title {
        font-size: 22px !important;
    }
}

.banner-container .card-image-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.05) 0%,
            rgba(124, 58, 237, 0.05) 50%,
            rgba(34, 211, 238, 0.05) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.banner-container .card-image-wrapper img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
    transition: transform 0.3s ease;
}

.banner-container .card-image-wrapper:hover img {
    transform: scale(1.05);
}

.banner-container .card-description {
    position: relative;
    z-index: 10;
    color: #1e293b !important;
    margin-top: 12px;
    margin-bottom: 32px;
    line-height: 1.625;
    font-weight: 400;
    /* max-width: 512px; */
}

@media (min-width: 768px) {
    .banner-container .card-description {
        font-size: 16px;
    }
}

.banner-container .card-button {
    position: relative;
    z-index: 10;
    width: 100%;
    /* max-width: 320px; */
    background: linear-gradient(135deg,
            #6366f1 0%,
            #7c3aed 50%,
            #22d3ee 100%);
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: #ffffff;
    font-weight: 600;
    /* padding: 14px 28px; */
    border-radius: 50px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(32px);
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    overflow: hidden;
    min-height: 40px;

}

.banner-container .card-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.banner-container .card-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.5),
        0 0 30px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation-duration: 2s;
}

.banner-container .card-button:hover::before {
    opacity: 1;
}

.banner-container .card-button:active {
    transform: translateY(0) scale(0.98);
}

@media (min-width: 768px) {
    .banner-container .card-button {
        font-size: 16px;
    }
}

.banner-container .pill-container.hovered .card-button {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* Removed hover functionality - click only */
.banner-container .card-button:active {
    transform: translateY(0) scale(0.98);
}

/* Add subtle glow effect to the entire modal */
.banner-container .pill-container.hovered::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 42px;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.3) 0%,
            rgba(124, 58, 237, 0.3) 50%,
            rgba(34, 211, 238, 0.3) 100%);
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    z-index: -2;
    filter: blur(20px);
    opacity: 0.6;
    pointer-events: none;
}

/* Main Firecracker Burst Animation */
.banner-container .main-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    width: 0;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-container .burst-ray {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center;
}

.banner-container .burst-ray-line {
    display: flex;
    align-items: center;
    gap: 2px;
}

.banner-container .burst-line {
    width: 12px;
    height: 1.5px;
    background: #3b82f6;
    border-radius: 9999px;
}

.banner-container .burst-dot {
    width: 3px;
    height: 3px;
    background: #4f46e5;
    border-radius: 9999px;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.8);
}

/* Animations */
@keyframes subtle-pulse {

    0%,
    100% {
        opacity: 0.15;
        filter: blur(12px);
        transform: scale(1);
    }

    50% {
        opacity: 0.25;
        filter: blur(16px);
        transform: scale(1.02);
    }
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes firework-burst-move {
    0% {
        transform: translateX(8px) scale(0.8);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        transform: translateX(32px) scale(1);
        opacity: 0;
    }
}

@keyframes firework-bg-loop {
    0% {
        transform: translateX(6px) scale(0.5);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    15% {
        transform: translateX(20px) scale(1);
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: translateX(20px) scale(1);
    }
}

@keyframes firework-page-loop {
    0% {
        transform: translateX(10px) scale(0.3);
        opacity: 0;
    }

    3% {
        opacity: 1;
    }

    20% {
        transform: translateX(50px) scale(1.2);
        opacity: 0.8;
    }

    40% {
        transform: translateX(80px) scale(1);
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: translateX(80px) scale(1);
    }
}

@media (max-width:991px) {
    .banner-container {
        padding: 50px 0 40px 0;
    }

    .banner-container .card-content {
        padding: 20px;
        border-radius: 20px;
    }

    .banner-container .pill-container.hovered {
        border-radius: 20px;
        top: 0px;
    }

    .banner-container .pill-container.hovered::before {
        border-radius: 22px;
    }

    .banner-container .pill-container.hovered::after {
        border-radius: 22px;
    }
}

@media (max-width:767px) {

    /* .banner-container .interaction-wrapper{
        opacity: 0;
        visibility: hidden;
    } */
    .banner-container {
        padding: 70px 0px 40px 0px;
    }

    .banner-container .pill-container.hovered {
        height: 550px;
    }
}

@media (max-width:575px) {
    .banner-container .pill-container.hovered {
        height: 640px;
    }
}

@media (max-width:400px) {
    .banner-container .card-image-wrapper {
        padding: 0px;
    }

    .banner-container .card-description {
        margin-bottom: 12px;
    }
}