/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #00cc66;
    --accent-color: #ff6600;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --error-color: #dc3545;
    --success-color: #28a745;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial';
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: inline-block;
    line-height: 0;
}

.logo {
    max-height: 60px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation Menu */
.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1em;
}

.nav-link:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 10px;
    margin: 30px 0;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.3em;
    opacity: 0.95;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.checkmark {
    font-size: 1.5em;
    flex-shrink: 0;
}

/* Pricing Preview */
.pricing-preview {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 40px 0;
    text-align: center;
}

.pricing-preview h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.price-highlight {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.price-highlight p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* CTA Section */
.cta-section {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 30px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--text-color);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 40px 0;
    position: relative;
}

.divider::before {
    content: '⭐';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 0 15px;
    font-size: 1.2em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Machine Selection Page */
.selection-container {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin: 30px 0;
    font-size: 2.5em;
}

.machines-table {
    overflow-x: auto;
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

thead {
    background: var(--primary-color);
    color: var(--white);
}

th, td {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

tbody tr.selected {
    background-color: #e7f3ff;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.sale-price {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2em;
}

input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Coupon Section */
.coupon-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.coupon-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

.coupon-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.coupon-message {
    min-height: 25px;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.coupon-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.coupon-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Summary Section */
.summary-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.summary-section h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--primary-color);
}

.discount-row {
    color: var(--success-color);
    font-weight: bold;
}

#proceedToPayment {
    width: 100%;
    margin-top: 20px;
    padding: 18px;
    font-size: 1.2em;
}

/* Payment Page */
.payment-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin: 30px 0;
}

.order-summary-card,
.payment-form-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.order-summary-card h2,
.payment-form-card h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.summary-details .summary-item {
    margin: 15px 0;
}

.total-item {
    background: #e7f3ff;
    padding: 15px !important;
    border-radius: 8px;
    font-size: 1.5em !important;
}

.discount-text {
    color: var(--success-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Stripe Elements */
.stripe-element {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    background: var(--white);
}

.stripe-element.StripeElement--focus {
    border-color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    margin-top: 10px;
    font-size: 0.9em;
}

.payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.payment-info p {
    margin: 8px 0;
    color: #555;
}

.payment-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.payment-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Back Link */
.back-link {
    text-align: center;
    margin: 30px 0;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1em;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Contact Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin: 30px 0;
}

.contact-info-section,
.contact-form-section {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-info-section h2,
.contact-form-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.6em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.contact-info-section p {
    margin: 15px 0;
    line-height: 1.8;
    color: var(--text-color);
}

.email-box {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 25px 0;
    border: 2px solid var(--primary-color);
}

.email-box a {
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: none;
}

.email-box a:hover {
    text-decoration: underline;
}

.info-note {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 25px;
    border-right: 4px solid var(--accent-color);
}

.info-note p {
    margin: 8px 0;
}

.info-note strong {
    color: var(--accent-color);
}

.required {
    color: var(--error-color);
    font-weight: bold;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-error {
    border-color: var(--error-color) !important;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
    min-height: 20px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
}

.direct-purchase-section {
    margin-top: 30px;
    padding-top: 30px;
    text-align: center;
}

.direct-purchase-section h3 {
    color: var(--primary-color);
    font-size: 1.4em;
    margin-bottom: 15px;
}

.direct-purchase-section p {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.05em;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Footer */
footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .payment-container {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        order: 2;
    }

    .payment-form-card {
        order: 1;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info-section {
        order: 1;
    }

    .contact-form-section {
        order: 2;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px 5px;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    h1 {
        font-size: 1.8em;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        max-height: 500px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child .nav-link {
        border-bottom: none;
    }

    .logo {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5em;
    }

    table {
        font-size: 0.8em;
    }

    th, td {
        padding: 8px 3px;
    }
}
