/* Custom CSS for Card Connect - Compact List View */

body {
    font-family: "Inter", sans-serif;
}

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dropdown functionality */
.dropdown:hover .dropdown-menu {
    display: block;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #B9E3D9 0%, #E6F3EB 100%);
}

/* Credit card animations */
.card-rotate-1 {
    transform: rotate(15deg);
    z-index: 2;
    animation: float-card-1 6s ease-in-out infinite;
}

.card-rotate-2 {
    transform: rotate(-25deg);
    z-index: 1;
    animation: float-card-2 6s ease-in-out infinite;
    animation-delay: 2s;
}

.credit-card {
    width: 400px;
    height: 250px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.credit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
    z-index: 1;
}

.credit-card:hover {
    transform: scale(1.05);
    box-shadow: 0 35px 70px rgba(0,0,0,0.3);
}

.card-rotate-1:hover {
    transform: rotate(8deg) scale(1.05);
}

.card-rotate-2:hover {
    transform: rotate(-15deg) scale(1.05);
}

.card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.card-purple::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    border-radius: 20px;
    z-index: 0;
}

.card-green {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    position: relative;
}

.card-green::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.8) 0%, rgba(0, 242, 254, 0.8) 100%);
    border-radius: 20px;
    z-index: 0;
}

/* Floating animations for credit cards */
@keyframes float-card-1 {
    0%, 100% {
        transform: rotate(15deg) translateY(0px);
    }
    50% {
        transform: rotate(15deg) translateY(-20px);
    }
}

@keyframes float-card-2 {
    0%, 100% {
        transform: rotate(-25deg) translateY(0px);
    }
    50% {
        transform: rotate(-25deg) translateY(-15px);
    }
}

/* Ensure card content is above overlays */
.credit-card > * {
    position: relative;
    z-index: 2;
}

/* Text Animation */
.animate-text {
    animation: slideInUp 1s ease-out 0.5s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Compare checkbox styling */
.compare-checkbox {
    cursor: pointer !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.compare-checkbox:hover {
    border-color: #0066FF !important;
    background-color: #f0f6ff !important;
}

.compare-checkbox[data-state="checked"] {
    background-color: #0066FF !important;
    border-color: #0066FF !important;
    color: white !important;
}

/* Remove the ::after pseudo-element as we're using innerHTML instead */

/* Override any conflicting styles */
button.compare-checkbox {
    background-color: white;
    border: 1.4px solid #1E1E1E;
}

button.compare-checkbox[data-state="checked"] {
    background-color: #0066FF !important;
    border-color: #0066FF !important;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e2e8f0;
}

.dark-mode-toggle:hover {
    background: #334155;
    transform: scale(1.1);
}

.light .dark-mode-toggle {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.light .dark-mode-toggle:hover {
    background: #e2e8f0;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured Cards Animation */
.group:hover .size-\[100px\] img {
    transform: scale(1.1) rotate(5deg);
    transition: all 0.3s ease;
}

.group .size-\[100px\] img {
    transition: all 0.3s ease;
}

/* Card category badges animation */
.group:hover .px-2.py-\[5px\] {
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Apply button pulse animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(66, 144, 226, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(66, 144, 226, 0);
    }
}

.bg-primary:hover {
    animation: pulse-glow 1.5s infinite;
}

/* Staggered animation for card list items */
.group:hover li {
    animation: slideInLeft 0.3s ease forwards;
}

.group li:nth-child(1) {
    animation-delay: 0.1s;
}

.group li:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes slideInLeft {
    from {
        opacity: 0.7;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Infinite Scroll Animation */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll-left {
    animation: scroll-left 30s linear infinite;
}

.animate-scroll-left:hover {
    animation-play-state: paused;
}

/* Hide scrollbar for credit cards section */
.scroll-bar-hide {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.scroll-bar-hide::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}



/* Text primary color */
.text-text-primary {
    color: #1E1E1E;
}

/* Primary color */
.bg-primary {
    background-color: #0066FF;
}

.text-primary {
    color: #0066FF;
}

.border-primary {
    border-color: #0066FF;
}

/* Light mode background color */
.bg-light-blue {
    background-color: #d4e4f7;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-10px);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1B756B, #2a9d8f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: #f8f9fa;
    transform: translateX(10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1B756B, #2a9d8f);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.5;
}

/* Hero Section Enhancements */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite;
}

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

/* Floating animations for hero elements */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Hero Credit Cards */
.credit-cards-hero {
    height: 400px;
    width: 100%;
    position: relative;
}

.credit-card-hero {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.credit-card-hero.card-1 {
    top: 20px;
    left: 20px;
    z-index: 3;
    animation: float-card-hero-1 8s ease-in-out infinite;
}

.credit-card-hero.card-2 {
    top: 80px;
    right: 20px;
    z-index: 2;
    animation: float-card-hero-2 8s ease-in-out infinite 2s;
}

.credit-card-hero.card-3 {
    top: 140px;
    left: 60px;
    z-index: 1;
    animation: float-card-hero-3 8s ease-in-out infinite 4s;
}

@keyframes float-card-hero-1 {
    0%, 100% {
        transform: rotate(12deg) translateY(0px);
    }
    50% {
        transform: rotate(8deg) translateY(-15px);
    }
}

@keyframes float-card-hero-2 {
    0%, 100% {
        transform: rotate(-12deg) translateY(0px);
    }
    50% {
        transform: rotate(-8deg) translateY(-10px);
    }
}

@keyframes float-card-hero-3 {
    0%, 100% {
        transform: rotate(3deg) translateY(0px);
    }
    50% {
        transform: rotate(1deg) translateY(-8px);
    }
}

.credit-card-hero:hover {
    transform: scale(1.05) !important;
    z-index: 10 !important;
}

/* Enhanced button animations */
.group:hover .fas {
    animation: icon-bounce 0.6s ease-in-out;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Scroll indicator animation */
@keyframes scroll-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Background blur effects */
.backdrop-blur-3xl {
    backdrop-filter: blur(60px);
}

/* Enhanced shadows */
.shadow-glow {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.shadow-glow-purple {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.3);
}

/* Responsive adjustments for hero */
@media (max-width: 1024px) {
    .credit-cards-hero {
        height: 350px;
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {
    .credit-cards-hero {
        height: 300px;
        transform: scale(0.8);
    }
    
    .credit-card-hero.card-1 {
        top: 10px;
        left: 10px;
    }
    
    .credit-card-hero.card-2 {
        top: 60px;
        right: 10px;
    }
    
    .credit-card-hero.card-3 {
        top: 110px;
        left: 40px;
    }
}

@media (max-width: 640px) {
    .credit-cards-hero {
        height: 250px;
        transform: scale(0.7);
    }
    
    .credit-card-hero div {
        width: 280px !important;
        height: 180px !important;
    }
}

/* Legacy credit card styles for other sections */
@media (max-width: 768px) {
    .credit-card {
        width: 300px;
        height: 190px;
    }
    
    .credit-cards {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .credit-card {
        width: 250px;
        height: 160px;
    }
    
    .credit-cards {
        transform: scale(0.7);
    }
}

/* Sticky Compare Component Styles */
#sticky-compare {
    transition: all 0.3s ease-in-out;
    transform: translateY(100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

#sticky-compare.show {
    transform: translateY(0) !important;
}

#sticky-compare .rounded-t-\[16px\] {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark #sticky-compare .rounded-t-\[16px\] {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.card-slot {
    min-height: 64px;
    transition: all 0.3s ease;
}

/* Remove card button hover effect */
.remove-card-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Compare button active state */
.compare-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Cancel button hover effect */
.cancel-compare-btn:hover {
    transform: translateY(-1px);
}

.card-slot .card-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: 100%;
}

.card-slot .card-preview img {
    width: 40px;
    height: 25px;
    object-fit: cover;
    border-radius: 4px;
}

.card-slot .card-preview .card-name {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .card-slot .card-preview .card-name {
    color: #d1d5db;
}

.card-slot .remove-card {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-slot .remove-card:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.compare-btn:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    cursor: pointer;
}

.compare-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}