:root {
    --main-color: #a3b740;
    --border-color: rgba(29, 29, 29, 0.16);
    --border-radius: 15px;
}

body {
    font-family: 'cairo', sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    color: rgb(0, 0, 0);
    margin-bottom: 5px;
}

input {
    width: 95% !important;
}

input,
select {
    background: #f4f4f4;
    text-align: center;
    font-family: 'cairo';
    width: 100%;
    color: rgb(24, 24, 24);
    padding: 10px;
    border: 1px solid rgb(150 150 150);
    border-radius: 15px;
}

button {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    font-family: 'cairo';
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

.details p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row-reverse;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
}

.payment-methods {
    /* margin-top: 20px; */
}

.payment-methods h2 {
    margin-top: 0px;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: background 0.3s ease;
}

.payment-option:hover {
    background: #f1f1f1;
}

.payment-option img {
    width: 100px;
    height: auto;
    margin-right: 15px;
}

.payment-option span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.payment-option button {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.payment-option button:hover {
    background: #0056b3;
}

[dir="rtl"] .payment-option img {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .payment-option {
    flex-direction: row-reverse;
}

/* New styles for Fawry instructions and form */
.fawry-instructions {
    display: none;
    background: #f9f9f9;
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.fawry-instructions p {
    font-size: 16px;
    margin: 0 0 10px 0;
}

.fawry-instructions strong {
    color: #007bff;
}

.container-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.container-cards .card {
    background-color: rgb(255, 255, 255);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgb(255 255 255 / 16%);
    position: relative;
}

.container-cards .card img {
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    object-fit: contain !important;
    margin-bottom: 20px;
    justify-self: center;
    border-radius: var(--border-radius);
}

.payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
    width: fit-content !important;
}

.payment-option:has(input[type="radio"]:checked) {
    background: #e6f0ff;
    border-color: #007bff;
}

.payment-option img {
    width: 100px;
    height: auto;
    margin-right: 15px;
}

.payment-option span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

[dir="rtl"] .payment-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .payment-option img {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .payment-option input[type="radio"] {
    margin-right: 0;
    margin-left: 10px;

    width: fit-content !important;
}

#submit-button {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

#submit-button:hover {
    background: #0056b3;
}

.container-cards .card .title {
    font-size: 16px;
    font-weight: bold;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--border-radius);
    background: black;
    /* position: absolute; */
    top: 24.7px;
    padding: 10px;
    right: 26px;
    color: var(--main-color);
    margin-bottom: 16px;
}

.price {
    color: rgb(0, 0, 0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-direction: column;
    /* border-bottom: 1px solid var(--border-color); */
    padding: 5px 2px 16px;
}

.price .price-value {
    color: var(--main-color);
    font-size: 17px;
    /* font-weight: bold; */
}

.container-cards .card .description {
    font-size: 15px;
    margin: 16px 0;
    text-align: center;
    color: rgb(27, 27, 27);
    /* font-weight: bold; */
    border-top: 1px solid var(--border-color);
    padding: 16px 0 0;
}

.container-cards .card .description:last-of-type {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.container-cards .card .choose-plan {
    width: 100%;
    border: none;
    background: var(--main-color);
    border-radius: var(--border-radius);
    padding: 10px 20px;
    /* font-weight: 900; */
    /* margin-top: 32px; */
    border-top: 1px solid var(--border-color);
    font-size: 20px;
    font-family: 'cairo';
}

.description-container {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.description-container.hidden {
    max-height: 0;
    opacity: 0;
}

/* تنسيق الزر ليكون متناسق مع التصميم */
.toggle-details-btn {
    background: transparent;
    border: none;
    color: rgb(0, 0, 0);
    font-family: 'Cairo', sans-serif;
    font-size: 20px;
    /* font-weight: bold; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.toggle-details-btn:hover {
    color: #2b2b2b;
}

.overlay {
    /* Add Linear Gridean Background */
    background: rgba(253, 205, 11, 0.2);
    /* background-color: #FDCD0B; */
    top: 0;
    position: fixed;
    width: 100%;
    z-index: 9;
    height: 100%;
    opacity: 0.9;
}

.container-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0.5rem;
    padding: 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(5px);
}

.card img, .card .title {
    margin-bottom: 0.5rem;
}

.price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.price-value {
    font-size: 1.25rem;
    font-weight: bold;
}

.price-title {
    font-size: 0.875rem;
    color: #9ca3af;
}

.selector-container {
    background-color: #1a1a1a;
    border-radius: 15px;
    padding: 5px;
    display: inline-flex;
}

.duration-option {
    padding: 5px 15px;
    margin-right: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.duration-option input[type="radio"] {
    display: none;
}

.duration-option:last-child {
    margin-right: 0;
}

.duration-option.selected {
    background-color: white;
    color: black;
    border-radius: 15px;
}

.choose-plan, .toggle-details-btn {
    padding: 0.75rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: background-color 0.3s;
}

.choose-plan:hover, .toggle-details-btn:hover {
    background-color: #15803d;
}

.description-container {
    margin-top: 1rem;
}

.description-container.hidden {
    display: none;
}

.description {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.paypal-button-row,
.paypal-button.paypal-button-text-color-black,
.paypal-button-row.paypal-button-layout-vertical {
    display: none !important;
}

.payment-options-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: none;
}

.payment-option-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: black;
    background-color: white;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.payment-option-button:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.payment-option-button.selected {
    background-color: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.payment-icon {
    width: 40px;
    height: 30px;
    margin-right: 15px;
    vertical-align: middle;
    object-fit: contain;
}

#card-form,
#fawry-instructions {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    display: none;
}

#fawry-instructions {
    text-align: center;
}

#card-form div {
    margin-bottom: 10px;
}

#card-form label {
    display: block;
    margin-bottom: 5px;
    text-align: center;
}

#card-form select,
#card-form input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#card-form .flex-row {
    display: flex;
    gap: 10px;
}

#card-form .flex-row div {
    flex: 1;
}

#card-form button {
    width: 100%;
    padding: 10px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

@media(min-width: 768px) {
    #paypal-phone-btn {
        display: none !important;
    }
}

@media(max-width: 850px) {
    .container-details {
        flex-direction: column;
    }

    .details,
    .payment-methods {
        width: 100%;
    }

    .divider {
        display: none;
    }
}

.paypal-button-row.paypal-button-layout-vertical {
    display: none !important;
}

.paypal-button-container {
    width: 92% !important;
}

