/* כלל כללי למניעת גלישה */
* {
    box-sizing: border-box;
}

/* יסודות עיצוב כלליים */
:root {
    --primary-color: #007aff; /* כחול של Apple */
    --text-color: #333;
    --bg-color: #f5f5f7;
    --light-gray: #e8e8e8;
    --font-family: 'Heebo', sans-serif;
}

body {
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    background-color: #fff; /* רקע לבן לכל הגוף */
    color: var(--text-color);
    overflow-x: hidden; /* מונע גלישה אופקית של התוכן */
}

.container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    background-color: var(--bg-color); /* הרקע האפור מיושם רק על ה-container */
    border-radius: 12px;
    margin-top: -80px; /* קיזוז שיוצר אפקט של "צף" מתחת להדר */
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* עיצוב Header חדש */
.main-header {
    background-color: #f0f0f5; /* צבע רקע עדין להדר */
    position: relative;
    z-index: 1;
    padding-bottom: 1rem; /* הוספת ריפוד תחתון כדי לפצות על המיקום האבסולוטי */
}

/* כלל חדש למיקום החץ בצד ימין */
.header-navigation {
    position: absolute;
    top: 1rem;
    right: 1rem; /* תיקון: מזיז את החץ לצד ימין */
    left: auto; /* תיקון: מבטל את ההיצמדות לצד שמאל */
}

.back-to-home {
    color: var(--text-color);
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-home:hover {
    color: var(--primary-color);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1rem 0;
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.5rem;
}

.main-header .subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 2rem;
}

.mockup-image-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mockup-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 0;
    position: relative;
    z-index: 5;
}

/* עיצוב טאבים (כפתורים לבחירת פלטפורמה) */
.tab-buttons-section {
    text-align: center;
    margin-top: 2rem;
}

.download-prompt {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #555;
}

.tab-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
    font-family: var(--font-family);
}

.tab-button {
    background-color: #fff;
    border: 1px solid var(--light-gray);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
    max-width: 250px;
    font-family: var(--font-family); /* הוסף שורה זו */
}

.tab-button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.tab-button:hover {
    background-color: var(--light-gray);
}

/* טאבים לא זמינים */
.tab-button.unavailable {
    opacity: 0.6; /* מפחית את אטימות הכפתור */
    cursor: not-allowed; /* משנה את סמן העכבר */
}

.tab-button.unavailable:hover {
    background-color: #fff; /* מבטל את אפקט הריחוף על כפתורים לא זמינים */
}

/* אפקט טשטוש לתוכן הטאבים הלא זמינים */
.tab-content.unavailable .download-card,
.tab-content.unavailable .installation-guide {
    filter: blur(5px); /* מפעיל טשטוש של 5px על התוכן */
    pointer-events: none; /* מונע לחיצות על תוכן הטשטוש */
}

/* עיצוב תוכן הטאב */
.divider {
    border: none;
    height: 1px;
    background-color: var(--light-gray);
    margin: 3rem 0;
}

.tab-content {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.download-card {
    text-align: center;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.download-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
}

.download-card p {
    font-size: 1rem;
    color: #555;
}

/* מיכל כפתורי ההורדה */
.download-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1rem; /* מרווח בין הכפתורים */
    flex-wrap: wrap; /* כדי לאפשר לכפתורים לעבור לשורה חדשה במסכים קטנים */
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.primary-button { background-color: var(--primary-color); }
.ios-button { background-color: #007aff; }
.android-button { background-color: #3dbe61; }

/* מדריך התקנה */
.installation-guide {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.installation-guide h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.guide-steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

/* סגנון ל-Windows */
.guide-step:nth-child(even) {
    flex-direction: row-reverse;
}

/* מכולות עבור תמונה ותוכן */
.step-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-image {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: auto;
}

.step-content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* פוטר ורספונסיביות */
footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--light-gray);
    margin-top: 3rem;
    font-size: 0.9rem;
    color: #888;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-content img {
    width: 25px;
    height: 25px;
    vertical-align: middle;
}

.footer-content p {
    margin: 0;
}

/* ==== עיצוב טלוויזיה חכמה ==== */

#smart-tv .app-platform-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#smart-tv .app-platform-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    color: #333;
}

#smart-tv .app-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

#smart-tv .app-link {
    text-decoration: none;
    text-align: center;
    flex: 1 1 120px;
    background-color: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#smart-tv .app-link:hover {
    background-color: var(--light-gray);
}

#smart-tv .app-icon-small img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

#smart-tv .app-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin-top: 0.5rem;
}

/* כפתור העתקה */
/* כפתור העתקה */
#smart-tv .copy-container,
#android .copy-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}

#smart-tv .url-box,
#android .url-box {
  flex: 1;
  background-color: #f9f9f9;
  border: 1px solid var(--light-gray);
  padding: 0.5rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

#smart-tv .copy-button,
#android .copy-button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background-color 0.2s ease;
}

#smart-tv .copy-button:hover {
    background-color: #005bbf;
}

.full-width-image {
    max-width: 100%;
}

/* === מדיה קווארי לרספונסיביות === */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }
    .main-header .subtitle {
        font-size: 1rem;
    }
    .container {
        margin-top: -40px;
        padding: 1rem;
    }
    .guide-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .guide-step:nth-child(even) {
        flex-direction: column;
    }
    .step-image-container {
        width: 100%;
        order: 1;
    }
    .step-content-container {
        width: 100%;
        order: 2;
        padding-right: 0;
    }
    .step-image {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    .tab-buttons-container {
        flex-direction: column;
    }
    .tab-button {
        width: 100%;
        max-width: none;
    }
    .step-content {
      flex-direction: column;
      text-align: center;
      align-items: center;
      width: 100%;
    }
    .guide-step .step-content .step-icon {
      margin-bottom: 0.5rem;
    }
    .copy-container {
        flex-direction: column;
        width: 100%;
    }
    .url-box {
        width: 100%;
    }
    .copy-button {
        width: 100%;
    }
    .app-platform-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .download-buttons-container {
        flex-direction: column;
    }
    .download-button {
        width: 100%;
    }
}

#smart-tv .app-icon-small img {
  width: 40px;
  height: 40px;
  border-radius: 8px; /* שינוי: הופך את הפינות לפחות מעוגלות */
}