/* صفحة الاشتراكات العصرية - CSS */

/* القسم الرئيسي العصري */
.subscription-hero {
    background: var(--gradient-secondary);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subscription-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%2360A9A9" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px var(--shadow);
}

.hero-badge i {
    font-size: 1.2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--heading);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--border-text);
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

/* مفتاح التبديل بين الشهري والسنوي */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    background: var(--white);
    padding: 20px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 30px var(--shadow);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    direction: rtl; /* تأكيد الاتجاه العربي للحاوي */
}

.toggle-label {
    font-weight: 600;
    color: var(--border-text);
    transition: all 0.3s ease;
    user-select: none; /* منع تحديد النص */
    cursor: pointer; /* مؤشر يد عند التمرير */
}

/* تفعيل التسمية عند التحديد */
.billing-toggle input:not(:checked) ~ .toggle-label:first-of-type,
.billing-toggle input:checked ~ .toggle-label:last-of-type {
    color: var(--heading);
    font-weight: 700;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--interactive);
    transition: 0.4s;
    border-radius: 30px;
    direction: ltr; /* إصلاح الاتجاه للزر */
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    right: 4px; /* تغيير من left إلى right للعربية */
    bottom: 4px;
    background: var(--white);
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: var(--heading);
}

input:checked + .toggle-slider:before {
    transform: translateX(-30px); /* تغيير الاتجاه للعربية */
}

.discount-badge {
    background: #e74c3c;
    color: var(--white);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 8px;
}

/* قسم خطط الاشتراك العصري */
.modern-plans-section {
    padding: 80px 0;
    background: var(--white);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.plan-card {
    background: var(--white);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-hover);
}

.plan-card.featured {
    border-color: var(--interactive);
    transform: scale(1.05);
}

.plan-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--shadow);
}

.plan-header {
    text-align: center;
    margin-bottom: 30px;
}

.plan-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 2rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 10px;
}

.plan-description {
    color: var(--border-text);
    opacity: 0.8;
    font-size: 1rem;
}

.plan-pricing {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid rgba(152, 216, 216, 0.1);
}

.price-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.currency {
    font-size: 1.5rem;
    color: var(--interactive);
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--interactive);
}

.period {
    font-size: 1rem;
    color: var(--border-text);
    opacity: 0.7;
}

.yearly-savings {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.9rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 40px;
}

.plan-features li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(152, 216, 216, 0.1);
}

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

.feature-included i {
    color: #28a745;
    width: 20px;
    font-size: 1.1rem;
}

.feature-excluded i {
    color: #dc3545;
    width: 20px;
    font-size: 1.1rem;
}

.feature-included span {
    color: var(--border-text);
}

.feature-excluded span {
    color: var(--border-text);
    opacity: 0.5;
}

.plan-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.plan-btn.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 8px 25px var(--shadow);
}

.plan-btn.btn-primary:hover {
    background: var(--heading);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--shadow-hover);
}

.plan-btn.btn-secondary {
    background: var(--white);
    color: var(--heading);
    border: 2px solid var(--interactive);
}

.plan-btn.btn-secondary:hover {
    background: var(--interactive);
    color: var(--white);
    transform: translateY(-3px);
}

/* قسم مقارنة الخطط */
.comparison-section {
    padding: 80px 0;
    background: var(--gradient-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--border-text);
    opacity: 0.8;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-table-container {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow);
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(152, 216, 216, 0.2);
}

.comparison-table th {
    background: var(--gradient-secondary);
    color: var(--heading);
    font-weight: 700;
    font-size: 1.1rem;
}

.feature-column {
    text-align: right !important;
    font-weight: 600;
    color: var(--border-text);
    min-width: 200px;
}

.plan-column {
    min-width: 120px;
}

.featured-column {
    background: rgba(152, 216, 216, 0.1);
    position: relative;
}

.featured-column::before {
    content: '⭐ الأكثر شعبية';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--interactive);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.feature-name {
    font-weight: 600;
    color: var(--border-text);
}

.text-success {
    color: #28a745;
    font-size: 1.2rem;
}

.text-danger {
    color: #dc3545;
    font-size: 1.2rem;
}

/* قسم الأسئلة الشائعة */
.faq-section {
    padding: 80px 0;
    background: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 2px solid rgba(152, 216, 216, 0.2);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--interactive);
    box-shadow: 0 8px 25px var(--shadow);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-secondary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(152, 216, 216, 0.2);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading);
}

.faq-question i {
    color: var(--interactive);
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 25px 30px;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: var(--border-text);
    line-height: 1.6;
    font-size: 1rem;
}

/* قسم الضمان والأمان */
.guarantee-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
}

.guarantee-content {
    max-width: 800px;
    margin: 0 auto;
}

.guarantee-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
}

.guarantee-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.guarantee-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

.guarantee-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.guarantee-item i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* تحريكات خفيفة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* تأثيرات التمرير */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* التجاوب */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .plan-card.featured {
        transform: none;
    }

    .plan-card.featured:hover {
        transform: translateY(-10px);
    }

    .comparison-table-container {
        padding: 20px;
    }

    .guarantee-features {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .subscription-hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .billing-toggle {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .plan-card {
        padding: 30px 20px;
    }

    .price {
        font-size: 2.5rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    .feature-column {
        min-width: 150px;
    }

    .plan-column {
        min-width: 100px;
    }

    .guarantee-content h2 {
        font-size: 2rem;
    }

    .guarantee-content p {
        font-size: 1rem;
    }

    .guarantee-features {
        flex-direction: column;
        gap: 20px;
    }

    .faq-question {
        padding: 20px;
    }

    .faq-question h3 {
        font-size: 1.1rem;
    }

    .faq-item.active .faq-answer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .plan-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .plan-name {
        font-size: 1.3rem;
    }

    .price {
        font-size: 2rem;
    }

    .currency {
        font-size: 1.2rem;
    }

    .plan-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .guarantee-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}
