/* Pricing Section Styles - Refactored for Tabs */

.pricing-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    background: transparent;
}

.pricing-header-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.pricing-slogan {
    font-size: 1.1rem;
    color: #a78bfa;
    margin-top: 10px;
    font-weight: 500;
    direction: rtl;
    /* Ensure arabic displays correctly */
}

.pricing-currency-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    position: relative;
    z-index: 20;
}

.currency-label {
    font-weight: 600;
    color: #888;
    transition: color 0.3s ease;
    cursor: pointer;
    display: flex;
    /* Align content properly */
    align-items: center;
    gap: 5px;
}

.currency-label.active {
    color: #fff;
}

/* Fix for large currency image */
.currency-symbol-img {
    height: 24px;
    /* Constrain height to match text/toggle */
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    /* Make it white */
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 30;
    /* Ensure clickable */
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #7c3aed;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.toggle-switch.active::after {
    right: 30px;
}

/* Tabs Navigation */
.pricing-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    overflow-x: auto;
    padding: 10px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.pricing-tabs-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.pricing-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.pricing-tab {
    padding: 10px 25px;
    border-radius: 40px;
    color: #ccc;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.pricing-tab.active {
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Pricing Grid & Cards */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    min-height: 400px;
    /* Prevent layout shift during transitions */
}

.pricing-section .pricing-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 40px 30px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    max-width: 380px;
    min-width: 280px;
    /* Cards flip animation */
    backface-visibility: hidden;
}

.pricing-section .pricing-card.flipping {
    transform: rotateY(90deg) scale(0.9);
    opacity: 0;
}

.pricing-section .pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: #7c3aed;
}

.pricing-section .pricing-card.best-value {
    border: 2px solid #7c3aed;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(124, 58, 237, 0.1) 100%);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-section .pricing-card.best-value:hover {
    transform: scale(1.05) translateY(-10px);
}

.best-value-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    z-index: 20;
    white-space: nowrap;
}

.pricing-title,
.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.pricing-section .pricing-card {
    cursor: pointer;
}

.pricing-price-wrapper {
    margin-bottom: 30px;
    text-align: center;
}

.price-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.price-amount {
    font-size: 2rem;
    /* Slightly smaller to fit ranges */
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.price-separator {
    color: #888;
    font-size: 1.5rem;
}

.price-currency {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.currency-icon {
    height: 20px;
    width: auto;
    object-fit: contain;
    /* Ensure icon doesn't stretch */
    filter: brightness(0) invert(0.6);
    margin-left: 5px;
}

.price-period {
    font-size: 0.9rem;
    color: #888;
    display: block;
    width: 100%;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #ccc;
}

.pricing-features li i {
    color: #7c3aed;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.pricing-btn {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    font-size: 1rem;
}

.pricing-btn.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pricing-btn.btn-outline:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
}

.pricing-btn.btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.pricing-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.4);
}

.vat-note {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
}

.vat-note i {
    margin-left: 8px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .pricing-section .pricing-card.best-value {
        transform: scale(1);
    }

    .pricing-section .pricing-card.best-value:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .pricing-section {
        padding: 60px 0;
    }

    .pricing-grid {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }

    .pricing-section .pricing-card {
        max-width: 100%;
        width: 100%;
    }

    .price-amount {
        font-size: 1.7rem;
    }

    .pricing-title {
        font-size: 1.3rem;
    }

    .pricing-tabs-container {
        justify-content: flex-start;
        /* Allow scroll from start */
    }
}