/* --- משתנים ועיצוב בסיסי --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --text-color: #212529;
    --card-bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --font-family: 'Arial', sans-serif;
}

[data-theme="dark"] {
    --primary-color: #0d6efd;
    --secondary-color: #adb5bd;
    --background-color: #121212;
    --text-color: #e9ecef;
    --card-bg-color: #1e1e1e;
    --border-color: #495057;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

html[dir="rtl"] body {
    /* ניתן להוסיף פונט עברי ייעודי */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Header & Navigation --- */
header {
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    height: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    position: relative;
}

.language-button, .theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 120px;
}

.language-selector:hover .language-dropdown {
    display: block;
}

.language-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
}
.language-dropdown a:hover {
    background-color: var(--primary-color);
    color: white;
}
html[dir="rtl"] .language-dropdown { right: 0; left: auto; }
html[dir="ltr"] .language-dropdown { right: auto; left: 0; }


/* --- Hero Section (Home Page) --- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}
.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
}
.hero .subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    color: var(--secondary-color);
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: backwards;
}

/* --- Buttons & Badges --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn:hover {
    transform: translateY(-2px);
}

.cta-buttons {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: backwards;
}

.app-badges {
    animation: fadeInUp 1s ease-out 0.9s;
    animation-fill-mode: backwards;
}
.app-badges p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}
.badges-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.badges-container img {
    height: 155px;
    width: auto;
    max-width: 180px;
    transition: transform 0.2s;
}

.badges-container img:hover {
    transform: scale(1.05);
}

/* --- Features Page --- */
.page-content {
    padding-top: 2rem;
    text-align: center;
}
.page-content h1 {
    margin-bottom: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.feature-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- Pricing Page --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

.pricing-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.pricing-card.popular {
    border-color: var(--primary-color);
    border-width: 2px;
}
.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.pricing-card .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.pricing-card .price span {
    font-size: 1rem;
    color: var(--secondary-color);
}
.pricing-card ul {
    list-style: none;
    text-align: right; /* For RTL */
    margin-bottom: 2rem;
    flex-grow: 1;
}
html[dir="ltr"] .pricing-card ul { text-align: left; }
.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* --- Legal Pages --- */
.legal-page {
    text-align: right;
    max-width: 800px;
}
html[dir="ltr"] .legal-page { text-align: left; }

.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.legal-page p, .legal-page ul {
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
    background-color: var(--card-bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-links a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--primary-color);
}
.footer-apps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.footer-apps img {
    height: 150px;
    width: auto;
    max-width: 165px;
    transition: opacity 0.2s;
}

.footer-apps img:hover {
    opacity: 0.85;
}

.copyright {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* --- Loader --- */
.loader-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
}
.loader {
    border: 5px solid var(--card-bg-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Animations --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    nav ul {
        display: none; /* Simple hiding on mobile, can be replaced with a hamburger menu */
    }
    .hero h1 { font-size: 2.2rem; }
    .hero .subtitle { font-size: 1rem; }
}

.billing-cycle-switch {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 5px;
    width: fit-content;
}

.btn-toggle {
    background: none;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    position: relative;
}

.btn-toggle.active {
    background-color: var(--primary-color);
    color: white;
}

.discount-badge {
    background-color: #28a745; /* Green color for discount */
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -10px;
    right: -10px;
}

[data-theme="dark"] .discount-badge {
    background-color: #34c759;
}

html[dir="rtl"] .discount-badge {
    right: auto;
    left: -10px;
}

.discount-text {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 0.5rem;
    height: 1.2em; /* שומר על גובה קבוע גם כשהטקסט ריק */
}
[data-theme="dark"] .discount-text {
    color: #34c759;
}
