:root {
    --primary-color: #0b2e59;
    --secondary-color: #d4af37;
    --success-color: #28a745;
    --bg-color: #f0f4f8;
    --text-color: #333;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    direction: rtl; 
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Language Switcher --- */
.lang-switch-wrapper {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.lang-switch-wrapper button {
    background: transparent;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}
.lang-switch-wrapper button.active {
    background: var(--primary-color);
    color: white;
}

/* --- Banner & Intro --- */
.hero-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
}
.hero-image-wrapper {
    width: 100%;
    background: transparent; 
    padding-top: 25px; 
}
.hero-image {
    width: auto;
    max-width: 90%; 
    height: auto;
    max-height: 450px;
    display: block;
    margin: 0 auto;
    border-radius: 12px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
}
.hero-content {
    padding: 30px;
}
.hero-content h1 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 28px;
}
h2.subtitle {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a8c 100%);
    color: white;
    text-align: center;
    font-size: 21px;
    font-weight: 800;
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 22px 20px;
    border-radius: 12px;
    border-bottom: 5px solid var(--secondary-color);
    box-shadow: 0 10px 25px rgba(11, 46, 89, 0.3);
    line-height: 1.4;
    animation: pulse-attention 2.5s infinite ease-in-out;
}
@keyframes pulse-attention {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Forms */
.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.form-group {
    margin-bottom: 20px;
    text-align: start;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
.phone-input-wrapper {
    display: flex;
    flex-direction: row; 
    direction: ltr; 
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    transition: border-color 0.3s;
}
.phone-input-wrapper:focus-within {
    border-color: var(--primary-color);
}
.phone-input-wrapper select {
    border: none;
    padding: 12px;
    background-color: #f4f7f6;
    cursor: pointer;
    font-size: 16px;
    border-right: 1px solid var(--border-color);
    outline: none;
    color: var(--text-color);
    width: 100px;
    direction: ltr; 
}
.phone-input-wrapper input {
    border: none;
    padding: 12px;
    flex: 1;
    font-size: 16px;
    background-color: transparent;
    outline: none;
    text-align: left; 
    direction: ltr;
}
input[type="text"], input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fcfcfc;
    font-size: 16px;
    outline: none;
}
button.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a8c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(11, 46, 89, 0.2);
}
button.btn-submit:hover {
    background: linear-gradient(135deg, #0e3a70 0%, #225a9c 100%);
}

/* --- מחשבון עיצוב חדש, מוקטן ומודרני --- */
#calculator-section {
    display: none;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-container {
    padding: 0;
    overflow: hidden;
}

.calc-header {
    background: var(--primary-color);
    color: white;
    padding: 15px; /* מוקטן משמעותית */
    text-align: center;
}
.calc-header h2 {
    margin: 0;
    font-size: 18px; /* מוקטן */
    color: white !important;
}

#calcForm {
    padding: 20px;
}

/* עיצוב שורות המחשבון המוקטנות */
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* מוקטן */
    border-bottom: 1px solid var(--border-color);
}
.calc-row:last-of-type {
    border-bottom: none;
}

.calc-labels {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-left: 15px;
}
html[dir="ltr"] .calc-labels {
    padding-left: 0;
    padding-right: 15px;
}
.calc-labels label {
    font-size: 14px; /* מוקטן */
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0 2px 0;
}
.calc-subtext {
    font-size: 11px; /* מוקטן */
    color: #64748b;
}

.calc-input {
    width: 120px; /* מוקטן */
}
.calc-input input {
    text-align: center;
    font-weight: bold;
    color: #333;
    font-size: 14px; /* מוקטן */
    padding: 8px; /* מוקטן */
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s;
}
.calc-input input:focus {
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* כפתורי המחשבון המוקטנים */
.calc-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.btn-calc {
    padding: 10px 15px; /* מוקטן */
    border: none;
    border-radius: 8px;
    font-size: 14px; /* מוקטן */
    font-weight: bold;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
    min-width: 100px;
}
.btn-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}
.btn-primary:hover {
    background: #c29d2f;
    transform: translateY(-2px);
}
.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    flex: 100%;
    margin-top: 5px;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* תוצאות - עיצוב כרטיסיות מוקטן ומודרני */
#results-area {
    background: #f8fafc;
    padding: 20px; /* מוקטן */
    border-top: 1px solid var(--border-color);
}

.results-modern-box {
    display: flex;
    flex-direction: column;
    gap: 12px; /* מוקטן */
    background: white;
    border-radius: 12px;
    padding: 15px; /* מוקטן */
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px; /* מוקטן */
    border-bottom: 1px solid #f1f5f9;
}
.res-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.res-label h3 {
    margin: 0;
    font-size: 14px; /* מוקטן */
    color: #475569;
}
.res-label span {
    font-size: 11px; /* מוקטן */
    color: #94a3b8;
}
.res-item .amount {
    font-size: 18px; /* מוקטן */
    font-weight: bold;
    color: #334155;
}

/* הדגשות לצבעים */
.profit-item .amount {
    color: var(--success-color);
}
.future-item {
    background: linear-gradient(to left, #f0fdf4, white);
    margin: 0 -15px -15px -15px; /* מוקטן בהתאם לפדינג החדש */
    padding: 15px; /* מוקטן */
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #dcfce7;
}
.future-item .res-label h3 {
    color: var(--success-color);
    font-size: 16px; /* מוקטן */
}
.future-item .amount {
    font-size: 24px; /* מוקטן */
    color: var(--success-color);
}

/* --- אזור הגרף (חדש) --- */
.chart-container {
    width: 100%;
    height: 300px;
    margin: 25px 0 15px 0;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: relative;
}

/* טבלה */
.table-wrapper {
    margin-top: 15px;
    text-align: center;
}
.btn-table-toggle {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 8px 16px; /* מוקטן */
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px; /* מוקטן */
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.btn-table-toggle:hover {
    background: var(--primary-color);
    color: white;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
th, td {
    border: 1px solid #e2e8f0;
    padding: 10px; /* מוקטן */
    text-align: center;
    font-size: 13px; /* מוקטן */
}
th {
    background-color: var(--primary-color);
    color: white;
}
tr:nth-child(even) {
    background-color: #f8fafc;
}

/* --- Floating Contact --- */
.elegant-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 65px;
    height: 65px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(11, 46, 89, 0.1), 0 12px 20px rgba(11, 46, 89, 0.2);
    color: var(--secondary-color);
}
.elegant-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s;
}
.modern-modal-content {
    background-color: white;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.modern-contact-actions.four-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}
.modern-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #f0f0f0;
}
.icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-bottom: 10px;
}
.phone-card { background: #f8fbff; color: #3b5bdb; }
.wa-card { background: #f2fdf9; color: #08a082; }
.wa-bot-card { background: #f0fbfc; color: #0b7285; }
.email-card { background: #fffaf0; color: #d9480f; }

#loading {
    display: none;
    text-align: center;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: bold;
}

/* רספונסיביות למחשבון ולגרף */
@media (max-width: 500px) {
    .calc-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px; /* מוקטן */
    }
    .calc-labels {
        padding: 0;
    }
    .calc-input {
        width: 100%;
    }
    .calc-input input {
        width: 100%;
    }
    .res-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .res-item .amount {
        align-self: flex-end;
    }
    .chart-container { 
        height: 250px; /* התאמה למובייל */
    }
}