/* Luminous Flare Links - CSS Animations */

.luminous-flare-links-container {
    position: relative;
    width: 100%;
    max-width: 512px; /* max-w-lg in Tailwind = 512px */
    margin: 0 auto;
    padding: 0; /* Original has no padding on container, only on cards */
}

/* Elementor Editor Mode - Better visibility while keeping animations */
.elementor-editor-active .flare-link-card .flare-card-inner {
    border-color: rgba(224, 75, 134, 0.6);
    box-shadow: 0 0 20px rgba(224, 75, 134, 0.35);
}

.elementor-editor-active .flare-card-bg {
    opacity: 0.75;
}

.flare-links-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Floating background bubbles */
.flare-bubbles {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.flare-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
}

.flare-bubble-1 {
    top: 25%;
    left: 25%;
    width: 128px;
    height: 128px;
    background-color: #E04B86;
    animation: floatBubble1 8s ease-in-out infinite;
}

.flare-bubble-2 {
    top: 50%;
    right: 25%;
    width: 96px;
    height: 96px;
    background-color: #F39EC7;
    animation: floatBubble2 10s ease-in-out infinite;
}

.flare-bubble-3 {
    bottom: 25%;
    left: 33%;
    width: 80px;
    height: 80px;
    background-color: #E04B86;
    animation: floatBubble3 12s ease-in-out infinite;
}

/* Flare Link Card - Base styles */
.flare-link-card {
    position: relative;
    display: block;
    text-decoration: none;
    transition: all 0.5s ease;
    border-radius: 12px;
}

/* Dynamic cards - inline styles applied via PHP for unlimited cards */
/* Width, animation, and delay set via inline styles in PHP */

/* Legacy support for first 3 cards (if not using dynamic mode) */
.flare-card-0 {
    width: 90%;
    animation: flareFloat1 4s ease-in-out infinite, flareLateral1 6s ease-in-out infinite;
}

.flare-card-1 {
    width: 100%;
    animation: flareFloat2 4s ease-in-out infinite, flareLateral2 6s ease-in-out infinite;
    animation-delay: 0.3s;
}

.flare-card-2 {
    width: 85%;
    animation: flareFloat3 4s ease-in-out infinite, flareLateral3 6s ease-in-out infinite;
    animation-delay: 0.6s;
}

.flare-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid rgba(224, 75, 134, 0.4);
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(224, 75, 134, 0.2);
    transition: all 0.5s ease;
}

.flare-link-card.active .flare-card-inner,
.flare-link-card:hover .flare-card-inner {
    border-color: #E04B86;
    box-shadow: 0 0 30px rgba(224, 75, 134, 0.6), 0 12px 40px rgba(224, 75, 134, 0.4);
    transform: scale(1.05);
}

/* Background gradient */
.flare-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(224, 75, 134, 0.2), rgba(243, 158, 199, 0.3), rgba(224, 75, 134, 0.2));
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.flare-link-card.active .flare-card-bg,
.flare-link-card:hover .flare-card-bg {
    opacity: 1;
}

/* Grid pattern overlay */
.flare-card-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    mix-blend-mode: overlay;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0iZ3JpZCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIj48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIwLjUiIG9wYWNpdHk9IjAuMSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmlkKSIvPjwvc3ZnPg==');
}

/* Content */
.flare-card-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    /* Match original p-5 (20px) exactly */
}

.flare-card-text {
    flex: 1;
}

.flare-card-title {
    font-family: Georgia, serif;
    font-size: 18px;
    color: #f4f4f4;
    margin: 0 0 4px 0;
    transition: color 0.3s ease;
}

.flare-link-card.active .flare-card-title,
.flare-link-card:hover .flare-card-title {
    color: #F39EC7;
}

.flare-card-subtitle {
    font-size: 12px;
    color: #d4d4d4;
    margin: 0;
    line-height: 1.5;
}

/* Animated glow overlay */
.flare-card-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(224, 75, 134, 0.2), transparent);
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.5s ease;
}

.flare-link-card.active .flare-card-glow,
.flare-link-card:hover .flare-card-glow {
    opacity: 1;
}

/* Icons */
.flare-card-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
}

/* Star Icon (AACD Accredited) */
.icon-star-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.icon-star-border {
    position: absolute;
    inset: 0;
    border: 2px solid #E04B86;
    border-radius: 12px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: flareGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(224, 75, 134, 0.6), 0 0 30px rgba(224, 75, 134, 0.3);
    transition: border-color 0.3s ease;
}

.flare-link-card:hover .icon-star-border {
    border-color: #F39EC7;
}

.icon-star {
    position: relative;
    width: 24px;
    height: 24px;
    background: linear-gradient(to bottom right, #E04B86, #F39EC7);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    box-shadow: 0 0 20px rgba(243, 158, 199, 0.8);
    transition: transform 0.3s ease;
}

.flare-link-card:hover .icon-star {
    transform: scale(1.1);
}

/* Bars Icon (Advanced Technology) */
.icon-bars-wrapper {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 100%;
}

.icon-bar {
    width: 4px; /* w-1 = 4px in Tailwind */
    background: linear-gradient(to top, #E04B86, #F39EC7, #E04B86);
    border-radius: 999px;
    transition: all 0.3s ease;
    animation: flareGlow 2s ease-in-out infinite;
}

.icon-bar-1 {
    height: 60%;
    box-shadow: 0 0 15px rgba(224, 75, 134, 0.8), 0 0 30px rgba(224, 75, 134, 0.4);
    animation-delay: 0s;
}

.icon-bar-2 {
    height: 100%;
    background: linear-gradient(to top, #F39EC7, #E04B86, #F39EC7);
    box-shadow: 0 0 20px rgba(243, 158, 199, 0.9), 0 0 40px rgba(243, 158, 199, 0.5);
    animation-delay: 0.3s;
}

.icon-bar-3 {
    height: 75%;
    box-shadow: 0 0 15px rgba(224, 75, 134, 0.8), 0 0 30px rgba(224, 75, 134, 0.4);
    animation-delay: 0.6s;
}

.flare-link-card:hover .icon-bar {
    width: 6px; /* w-1.5 = 6px in Tailwind */
}

/* Publications Icon */
.icon-publications-wrapper {
    position: relative;
    height: 48px;
    width: 40px;
}

.icon-page {
    position: absolute;
    width: 32px;
    height: 40px;
    background: linear-gradient(to bottom right, rgba(224, 75, 134, 0.6), rgba(243, 158, 199, 0.6));
    border: 1px solid rgba(224, 75, 134, 0.4);
    border-radius: 2px;
    animation: flareGlow 2s ease-in-out infinite;
    transition: border-color 0.3s ease;
}

.icon-page-back-2 {
    top: 0;
    right: 0;
    transform: rotate(8deg) translateX(2px);
    animation-delay: 0.4s;
    box-shadow: 0 0 10px rgba(224, 75, 134, 0.4);
}

.icon-page-back-1 {
    top: 4px;
    right: 4px;
    transform: rotate(4deg);
    animation-delay: 0.2s;
    box-shadow: 0 0 15px rgba(224, 75, 134, 0.5);
    background: linear-gradient(to bottom right, #E04B86, #F39EC7);
}

.icon-page-front {
    top: 8px;
    left: 0;
    border: 2px solid #E04B86;
    background: linear-gradient(to bottom right, #E04B86, #F39EC7);
    box-shadow: 0 0 20px rgba(243, 158, 199, 0.8), 0 0 35px rgba(243, 158, 199, 0.4);
    transition: all 0.3s ease;
}

.flare-link-card:hover .icon-page {
    border-color: #F39EC7;
}

.flare-link-card:hover .icon-page-front {
    transform: scale(1.05);
}

/* Page line details */
.icon-page-back-2::before,
.icon-page-back-1::before,
.icon-page-front::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 1px;
}

.icon-page-back-2::after,
.icon-page-back-1::after,
.icon-page-front::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 6px;
    right: 10px;
    height: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}

/* Keyframe Animations */

/* Floating animations - Matched to original site */
@keyframes flareFloat1 {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(-8px) scaleY(1.15);
    }
}

@keyframes flareFloat2 {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(-12px) scaleY(1.25);
    }
}

@keyframes flareFloat3 {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }
    50% {
        transform: translateY(-6px) scaleY(1.1);
    }
}

/* Lateral movement animations - Matched to original site */
@keyframes flareLateral1 {
    0%, 100% {
        transform: translateX(0);
    }
    33% {
        transform: translateX(-15px);
    }
    66% {
        transform: translateX(8px);
    }
}

@keyframes flareLateral2 {
    0%, 100% {
        transform: translateX(0);
    }
    33% {
        transform: translateX(12px);
    }
    66% {
        transform: translateX(-18px);
    }
}

@keyframes flareLateral3 {
    0%, 100% {
        transform: translateX(0);
    }
    33% {
        transform: translateX(-10px);
    }
    66% {
        transform: translateX(15px);
    }
}

/* Bubble animations - Matched to original site with opacity */
@keyframes floatBubble1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    33% {
        transform: translate(20px, -30px) scale(1.1);
        opacity: 0.5;
    }
    66% {
        transform: translate(-15px, -15px) scale(0.9);
        opacity: 0.4;
    }
}

@keyframes floatBubble2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    33% {
        transform: translate(-25px, 20px) scale(1.15);
        opacity: 0.45;
    }
    66% {
        transform: translate(10px, -25px) scale(0.85);
        opacity: 0.35;
    }
}

@keyframes floatBubble3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    33% {
        transform: translate(15px, 25px) scale(1.2);
        opacity: 0.4;
    }
    66% {
        transform: translate(-20px, 10px) scale(0.95);
        opacity: 0.3;
    }
}

/* Glow pulse animation - Matched to original site */
@keyframes flareGlow {
    0%, 100% {
        filter: brightness(1) blur(0px);
    }
    50% {
        filter: brightness(1.3) blur(2px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .luminous-flare-links-container {
        padding: 16px; /* Add some padding on mobile */
    }

    .flare-links-wrapper {
        gap: 16px;
    }

    .flare-card-0,
    .flare-card-1,
    .flare-card-2 {
        width: 100%;
    }

    .flare-card-content {
        padding: 15px;
    }

    .flare-card-title {
        font-size: 16px;
    }

    .flare-card-subtitle {
        font-size: 11px;
    }
}
