/* Variables */
:root {
    --primary-color: #1A2A4F;      /* أساسي - رسمي: خلفية الهيدر والفوتر والعناوين */
    --secondary-color: #23A095;    /* أساسي مساعد - تقني: خلفيات متدرجة، أيقونات */
    --accent-color: #5ED6C1;       /* ثانوي - مميز: أيقونات، أزرار ثانوية */
    --cta-color: #00FF9D;          /* Call to Action: أزرار التسجيل، هوفر الروابط */
    --neutral-bg: #F1F3F2;         /* خلفية محايدة: خلفيات الأقسام، نص الفوتر */
    --text-color: #333333;         /* قابلية قراءة: نصوص أساسية */
    --white: #FFFFFF;              /* وضوح وتباين: النصوص والخلفيات */
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    --card-transition: all 0.4s cubic-bezier(0.71, 0.03, 0.56, 0.85);
    --hover-transform: translateY(-5px);
}

/* General Styling */
body {
    background-color: var(--neutral-bg);
    font-family: 'Cairo', 'Tajawal', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    direction: rtl;
}

.container {
    padding: 20px;
}

/* Header Styling */
.header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .logo {
    font-size: 24px;
    font-weight: 700;
}

.header .nav-link {
    color: var(--white);
    transition: all 0.3s ease;
}

.header .nav-link:hover {
    color: var(--cta-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Options Cards */
.options-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.option-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--card-transition);
    width: 300px;
    height: 350px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.option-card:hover {
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.option-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.option-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.option-card-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.option-card-text {
    color: var(--text-color);
    margin-bottom: 20px;
}

.option-card-icon {
    font-size: 50px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.btn-primary {
    background: linear-gradient(90deg, var(--secondary-color), var(--cta-color));
    border: none;
    font-weight: 500;
    padding: 12px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: var(--primary-color);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--cta-color), var(--secondary-color));
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(94, 214, 193, 0.4);
    transform: var(--hover-transform);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Forms */
.form-container {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    margin: 20px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.form-title {
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-control {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(35, 160, 149, 0.25);
}

.form-select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(35, 160, 149, 0.25);
}

/* Tables */
.table-container {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    margin: 20px auto;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.table-title {
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.table-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    font-weight: 500;
    text-align: right;
}

.table thead th:first-child {
    border-top-right-radius: 10px;
}

.table thead th:last-child {
    border-top-left-radius: 10px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(241, 243, 242, 0.5);
}

.table tbody tr:hover {
    background-color: rgba(94, 214, 193, 0.1);
}

.table tbody td {
    padding: 15px;
    border-top: 1px solid #e9ecef;
}

/* Course Cards */
.course-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.course-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--card-transition);
    width: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.course-card:hover {
    transform: var(--hover-transform);
    box-shadow: var(--hover-shadow);
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.course-card-img {
    height: 180px;
    object-fit: cover;
}

.course-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.course-card-text {
    color: var(--text-color);
    margin-bottom: 20px;
}

.course-card-price {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    margin-top: auto;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--neutral-bg);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--cta-color);
    padding-right: 5px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    margin-top: 30px;
}

.footer-bottom p {
    margin-bottom: 0;
    text-align: center;
}

/* Payment Form */
.payment-container {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 35px;
    margin: 20px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.payment-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.payment-title {
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.payment-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

/* 3D Credit Card */
.card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    height: 250px;
    margin: 0 auto 40px;
}

.credit-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: var(--card-transition);
}

.credit-card:hover {
    transform: rotateY(180deg);
}

.credit-card-front,
.credit-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.credit-card-front {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credit-card-back {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: rotateY(180deg);
}

.card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffcc00);
    border-radius: 8px;
    position: relative;
    margin-bottom: 20px;
}

.card-chip::before,
.card-chip::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.3);
    left: 10%;
}

.card-chip::before {
    top: 30%;
}

.card-chip::after {
    top: 60%;
}

.card-logo {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 30px;
    color: var(--white);
}

.card-number {
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--white);
    text-align: center;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

.card-info {
    display: flex;
    justify-content: space-between;
    color: var(--white);
    font-size: 14px;
}

.card-holder span,
.card-expiry span {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.7;
}

.card-stripe {
    background-color: #000;
    height: 50px;
    margin-top: 30px;
}

.card-signature {
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.signature-line {
    flex-grow: 1;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    margin-right: 10px;
}

.cvv-label {
    font-size: 10px;
    color: var(--white);
    margin-right: 5px;
}

.cvv-box {
    background-color: var(--white);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.card-info-back {
    padding: 20px;
    color: var(--white);
    font-size: 9px;
    text-align: center;
    position: absolute;
    bottom: 10px;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .options-container {
        gap: 20px;
    }
    
    .option-card {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .form-container, 
    .table-container,
    .payment-container {
        padding: 25px;
    }
    
    .option-card {
        width: 100%;
        max-width: 350px;
    }
    
    .card-container {
        height: 200px;
    }
    
    .card-number {
        font-size: 18px;
    }
    
    .card-info {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .form-container, 
    .table-container,
    .payment-container {
        padding: 20px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px;
    }
}
