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

:root {
    --primary-color: #00f2ff;
    --secondary-color: #bc13fe;
    --gemini-color: #00f2ff;
    --grok-color: #ff9d00;
    --leo-color: #bc13fe;
    --text-dark: #ffffff;
    --text-light: #a0a0a0;
    --bg-light: #0b0e14;
    --bg-white: rgba(25, 29, 38, 0.8);
    --border-color: rgba(255, 255, 255, 0.15);
    --success-color: #10b981;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Rubik', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    background-image: radial-gradient(circle at top right, rgba(0, 242, 255, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(188, 19, 254, 0.05), transparent);
    min-height: 100vh;
}

/* Navigation */
app-navbar,
app-footer {
    display: block;
    width: 100%;
}

nav {
    background: var(--bg-white);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    direction: ltr !important;
    /* Force LTR for navbar */
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

html[lang="he"] .nav-links {
    flex-direction: row-reverse;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 15px;
}

.lang-toggle a {
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.lang-toggle a.active {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.lang-toggle a:not(.active) {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.lang-toggle a:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

/* Bilingual Visibility Logic */
[lang="he"] [data-lang="en"] {
    display: none !important;
}

[lang="en"] [data-lang="he"] {
    display: none !important;
}

/* Default fallback if no lang attribute on HTML */
html:not([lang]) [data-lang="he"],
html[lang=""] [data-lang="he"] {
    display: none !important;
}

html[lang="he"] [lang="en"] {
    display: none !important;
}

html[lang="en"] [lang="he"],
html:not([lang]) [lang="he"] {
    display: none !important;
}

/* RTL Adjustments */
html[dir="rtl"] .about p,
html[dir="rtl"] .features-grid,
html[dir="rtl"] .cta-section,
html[dir="rtl"] footer {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .hero {
    direction: rtl;
    text-align: center;
}


/* Hero Section */
.hero {
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #0b0e14;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.3);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(188, 19, 254, 0.5);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.75;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* Footer */
footer {
    background-color: rgba(25, 29, 38, 0.5);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Legal Pages */
.legal-page {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow);
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.legal-page h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.legal-page h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.legal-page p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.legal-page ul,
.legal-page ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
}

.last-updated {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}