/* ============================================================
   بطاقات الأسعار الموحدة — تُستخدم في:
   - الصفحة الرئيسية (public/index.php)
   - صفحة الترقية (user/upgrade_subscription.php)
   - صفحة التجديد (user/renew_subscription.php)
   الكروت نفسها من: includes/pricing_cards.php
   ============================================================ */

.pricing-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.pricing-card {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 62px 24px 24px;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    margin-top: 14px;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.pricing-card.premium-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7fa 0%, #f8f9fa 100%);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.pricing-card.premium-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.pricing-card.dr-card {
    border-color: #e9ecef;
}

.pricing-card.dr-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(40, 167, 69, 0.15);
}

/* الشارات المكدسة أعلى الكارت — لا تغطي العنوان بفضل padding العلوي */
.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
    white-space: nowrap;
}

.pricing-card .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 4px));
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
    white-space: nowrap;
}

.pricing-card.dr-card .badge {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.pricing-card.dr-card h3 {
    color: #1e7e34;
}

.pricing-card h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
}

/* السعر في سطر واحد دائماً */
.pricing-card .price {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 5px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 25px;
    white-space: nowrap;
}

.pricing-card .price .price-period {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.pricing-card .features {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
    text-align: right;
    flex-grow: 1;
}

.pricing-card .features li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

.pricing-card .features li:last-child {
    border-bottom: none;
}

.pricing-card .features li::before {
    content: "\2713";
    color: #4CAF50;
    font-weight: bold;
    margin-left: 8px;
}

.pricing-card .btn {
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s;
}

.pricing-card.basic-card .btn {
    background-color: transparent;
    border: 2px solid #667eea !important;
    color: #667eea;
}

.pricing-card.basic-card .btn:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pricing-card.premium-card .btn:hover,
.pricing-card.dr-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 992px) {
    .pricing-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .pricing-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pricing-card {
        margin-top: 14px;
    }

    .pricing-card.premium-card {
        transform: scale(1);
    }

    .pricing-card.premium-card:hover {
        transform: translateY(-8px);
    }
}
