/* STYLE.css (unchanged design) */
/* איפוס ובסיס */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ניהול מסכים */
.section {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
}

.section.active {
    display: block;
}

/* כותרות */
h1 {
    font-size: 3rem;
    color: white;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 1.8rem;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* תיבת הסבר */
.explanation-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.explanation-box h3 {
    color: #667eea;
    margin-top: 20px;
}

.explanation-box h3:first-child {
    margin-top: 0;
}

.explanation-box ul {
    list-style-position: inside;
    padding-right: 20px;
}

.explanation-box li {
    margin-bottom: 10px;
    color: #333;
}

.explanation-box strong {
    color: #764ba2;
}

/* טופס הזנת נתונים */
.input-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9rem;
}

/* כפתורים */
.btn-primary, .btn-secondary {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 20px auto;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* סטטוס בר */
.status-bar {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status-item {
    text-align: center;
    padding: 10px;
    min-width: 150px;
}

.status-item .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.status-item .value {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
}

.status-item .total, .status-item .unit {
    font-size: 1rem;
    color: #999;
}

/* אזור החלטות */
#decisionArea {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#decisionArea h2 {
    color: #667eea;
}

.hint {
    text-align: center;
    color: #764ba2;
    font-weight: bold;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* גריד כרטיסים */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* כרטיס רכישה - אחיד לכולם */
.purchase-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.purchase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.card-details {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    min-height: 60px;
}

.card-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #764ba2;
    margin-bottom: 15px;
}

.card-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.card-btn:hover:not(:disabled) {
    background: #764ba2;
    transform: scale(1.05);
}

.card-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.out-of-budget {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px;
}

/* מסך תוצאות */
#resultsContent {
    background: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

/* קופסת טיזר למדריך */
.guide-teaser {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.guide-teaser h2 {
    color: #d84315;
    margin-bottom: 15px;
}

.guide-teaser p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #333;
}

/* טופס יצירת קשר */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.contact-form .form-group {
    text-align: right;
}

.thank-you {
    background: #c8e6c9;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
}

.thank-you h3 {
    color: #2e7d32;
}


/* === Fit the game page to a single viewport (no page scroll needed) === */
#gameSection.section { padding: 16px 12px; }                 /* היה 40px 20px מכללי */
#gameSection .container { padding: 0; }                      /* היה padding:20px מכללי */

#gameSection .status-bar {
  padding: 12px;                                            /* היה 20px */
  margin-bottom: 16px;                                      /* היה 30px */
}

#decisionArea {
  padding: 16px;                                            /* היה 30px */
}

#decisionArea h2 { margin-bottom: 10px; }                   /* היה 30px מכללי ל-h2 */
.hint { margin-bottom: 14px; font-size: clamp(0.95rem, 1.6vw, 1.1rem); }

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));  /* היה 250px -> יותר עמודות, פחות שורות */
  gap: 14px;                                                    /* היה 20px */
  margin-bottom: 16px;                                          /* היה 30px */
}

.card-title   { font-size: clamp(1rem, 1.8vw, 1.2rem); }
.card-details { font-size: clamp(0.9rem, 1.6vw, 1rem); min-height: auto; }
.card-price   { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 10px; }
.card-btn     { padding: 10px; font-size: clamp(1rem, 1.8vw, 1.05rem); }

#gameSection .btn-secondary { margin: 12px auto 0; }           /* היה 20px auto */


