﻿/* =========================================================
           SPARKYS MEMBERSHIP - PREMIUM REDESIGN
           - Modern glassmorphism with depth
           - Smooth micro-interactions
           - Enhanced visual hierarchy
           - Mobile-first responsive design
           - Accessibility-focused
        ========================================================= */
:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(148, 163, 184, 0.2);
    --text-primary: rgba(15, 23, 42, 0.95);
    --text-secondary: rgba(71, 85, 105, 0.9);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);
}

/* Main Container */
.membership-section {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
}

/* Animated Background */
.membership-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

    .membership-bg::before,
    .membership-bg::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        opacity: 0.15;
        animation: float 20s ease-in-out infinite;
    }

    .membership-bg::before {
        width: 600px;
        height: 600px;
        background: linear-gradient(135deg, #6366f1, #ec4899);
        top: -200px;
        left: -100px;
        animation-delay: 0s;
    }

    .membership-bg::after {
        width: 500px;
        height: 500px;
        background: linear-gradient(135deg, #ec4899, #f59e0b);
        bottom: -150px;
        right: -50px;
        animation-delay: -10s;
    }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Header Section */
.membership-header {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    animation: fadeInUp 0.8s ease-out;
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.membership-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.membership-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.membership-offer {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

    .membership-offer::before {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: shimmer 3s infinite;
    }

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.offer-pulse {
    width: 10px;
    height: 10px;
    background: var(--primary-gradient);
    border-radius: 50%;
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Cards Grid - ALWAYS 2 columns for easy comparison */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 3vw, 2rem);
    max-width: 900px;
    margin: 0 auto;
}

/* Card */
.membership-card {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2rem);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

    .membership-card:nth-child(2) {
        animation-delay: 0.15s;
    }

    .membership-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--primary-gradient);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .membership-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
        border-color: rgba(99, 102, 241, 0.3);
    }

        .membership-card:hover::before {
            transform: scaleX(1);
        }

    .membership-card.featured {
        border-color: rgba(236, 72, 153, 0.4);
        box-shadow: 0 16px 48px rgba(236, 72, 153, 0.15);
    }

        .membership-card.featured::before {
            background: linear-gradient(135deg, #f59e0b, #ec4899);
        }

/* Best Value Badge */
.best-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.875rem;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
    z-index: 10;
}

[dir="rtl"] .best-badge {
    right: auto;
    left: 1rem;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.membership-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.tier-badge {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

    .tier-badge.silver {
        background: linear-gradient(135deg, #94a3b8, #cbd5e1);
        color: #1e293b;
    }

    .tier-badge.gold {
        background: linear-gradient(135deg, #f59e0b, #eab308);
        color: #422006;
    }

.card-price {
    text-align: right;
}

[dir="rtl"] .card-price {
    text-align: left;
}

.price-amount {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
    justify-content: flex-end;
}

[dir="rtl"] .price-amount {
    justify-content: flex-start;
}

.price-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.price-period {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Discount Section */
.discount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(236, 72, 153, 0.05);
    border: 1px dashed rgba(236, 72, 153, 0.3);
    border-radius: 16px;
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white;
    font-size: 0.875rem;
    font-weight: 800;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.discount-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.original-price {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(236, 72, 153, 0.6);
}

.savings-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
}

/* Benefits Section */
.benefits-header {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .benefits-header::before {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--glass-border));
    }

    .benefits-header::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, var(--glass-border), transparent);
    }

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .benefit-item:hover {
        background: rgba(255, 255, 255, 0.9);
        transform: translateX(4px);
        box-shadow: var(--shadow-sm);
    }

[dir="rtl"] .benefit-item:hover {
    transform: translateX(-4px);
}

.benefit-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.benefit-icon {
    width: 8px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.benefit-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.benefit-value {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Package Discount */
.package-discount {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.package-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.package-emoji {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.package-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.package-value {
    font-size: 1.125rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Footer */
.card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.btn-primary {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

    .btn-primary::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-primary:hover::before {
        width: 300px;
        height: 300px;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    padding: 0.875rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .btn-secondary::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-gradient);
        transition: width 0.3s ease;
    }

    .btn-secondary:hover {
        color: var(--text-primary);
    }

        .btn-secondary:hover::after {
            width: 100%;
        }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations - Keep 2 columns but adjust spacing */
@media (max-width: 640px) {
    .membership-section {
        padding: clamp(1.5rem, 4vw, 3rem) clamp(0.75rem, 2vw, 1.5rem);
    }

    .membership-grid {
        gap: clamp(0.625rem, 2vw, 1rem);
    }

    .membership-card {
        padding: clamp(0.875rem, 3vw, 1.25rem);
        border-radius: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .card-icon-wrapper {
        gap: 0.625rem;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

        .card-icon svg {
            width: 20px;
            height: 20px;
        }

    .tier-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .card-price {
        width: 100%;
        text-align: left;
    }

    [dir="rtl"] .card-price {
        text-align: right;
    }

    .price-amount {
        justify-content: flex-start;
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    [dir="rtl"] .price-amount {
        justify-content: flex-end;
    }

    .price-currency,
    .price-period {
        font-size: 0.75rem;
    }

    .best-badge {
        top: 0.625rem;
        right: 0.625rem;
        font-size: 0.625rem;
        padding: 0.3rem 0.625rem;
    }

    [dir="rtl"] .best-badge {
        right: auto;
        left: 0.625rem;
    }

    .discount-row {
        padding: 0.75rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .discount-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .original-price {
        font-size: 0.75rem;
    }

    .savings-text {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .benefits-header {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
    }

    .benefits-list {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .benefit-item {
        padding: 0.625rem 0.75rem;
        border-radius: 10px;
        gap: 0.5rem;
    }

    .benefit-left {
        gap: 0.5rem;
    }

    .benefit-icon {
        width: 6px;
        height: 6px;
    }

    .benefit-text,
    .benefit-value {
        font-size: clamp(0.75rem, 2.5vw, 0.875rem);
    }

    .package-discount {
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .package-emoji {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .package-text {
        font-size: clamp(0.75rem, 2.5vw, 0.875rem);
    }

    .package-value {
        font-size: 1rem;
    }

    .card-footer {
        flex-direction: column;
        gap: 0.625rem;
        padding-top: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Extra small phones - further optimizations */
@media (max-width: 380px) {
    .membership-grid {
        gap: 0.5rem;
    }

    .membership-card {
        padding: 0.75rem;
        border-radius: 14px;
    }

    .card-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .card-icon {
        width: 36px;
        height: 36px;
    }

        .card-icon svg {
            width: 18px;
            height: 18px;
        }

    .tier-badge {
        padding: 0.3rem 0.625rem;
        font-size: 0.6875rem;
    }

    .price-amount {
        font-size: clamp(1.25rem, 7vw, 1.75rem);
    }

    .discount-badge {
        font-size: 0.6875rem;
    }

    .benefit-text,
    .benefit-value,
    .package-text {
        font-size: 0.75rem;
    }

    .membership-title {
        font-size: clamp(1.25rem, 6vw, 2rem);
    }

    .membership-subtitle {
        font-size: 0.875rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
