/* ===== Variables ===== */
:root {
    --primary: #1a5276;
    --primary-dark: #0e3651;
    --primary-light: #2980b9;
    --accent: #f39c12;
    --accent-dark: #d68910;
    --text: #1a1a2e;
    --text-secondary: #5a6577;
    --text-light: #8899aa;
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --bg-dark: #0e1b2d;
    --border: #e3e8ef;
    --success: #27ae60;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-accent { color: var(--accent); }

.text-gradient {
    background: linear-gradient(135deg, var(--accent), #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26,82,118,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: 14px;
}

.btn-full { width: 100%; justify-content: center; }

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.nav-cta { font-size: 0.85rem; padding: 10px 20px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 50%, #fef9ef 100%);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat { text-align: center; }

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
}

.phone-frame {
    width: 280px;
    background: #000;
    border-radius: 36px;
    padding: 12px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.phone-frame:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.phone-screen {
    border-radius: 26px;
    width: 100%;
}

/* ===== Section Shared ===== */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(26,82,118,0.08);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===== Features ===== */
.features {
    padding: 100px 0;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 14px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Screenshots ===== */
.screenshots {
    padding: 100px 0;
    background: var(--bg-alt);
    overflow: hidden;
}

.screenshots-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
}

.screenshots-carousel::-webkit-scrollbar { display: none; }

.screenshot-track {
    display: flex;
    gap: 24px;
    padding: 0 calc((100vw - 1200px) / 2);
}

.screenshot-item {
    flex: 0 0 auto;
    text-align: center;
}

.screenshot-phone {
    width: 220px;
    background: #000;
    border-radius: 28px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.screenshot-phone:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.screenshot-phone img {
    border-radius: 22px;
    width: 100%;
}

.screenshot-label {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Pricing ===== */
.pricing {
    padding: 100px 0;
    background: var(--bg);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.price-card {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.price-card-popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
    z-index: 1;
}

.price-card-popular:hover {
    transform: scale(1.05) translateY(-4px);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.price-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.price-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.period {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.price-savings {
    display: inline-block;
    background: rgba(39,174,96,0.1);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.price-features {
    text-align: left;
    margin: 24px 0 32px;
}

.price-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2327ae60' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== FAQ ===== */
.faq {
    padding: 100px 0;
    background: var(--bg-alt);
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-light);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after {
    content: '-';
    color: var(--primary);
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== CTA ===== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
}

.cta-content {
    text-align: center;
    color: #fff;
}

.cta-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.cta h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 36px;
}

.cta .btn-primary {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}

.cta .btn-primary:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: #fff;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.5);
}

.footer-links a {
    display: block;
    padding: 6px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ===== Legal Pages ===== */
.legal-page {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.legal-content {
    max-width: 720px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-content .legal-updated {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--primary);
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.legal-content ul {
    margin: 0 0 16px 24px;
    list-style: disc;
}

.legal-content ul li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
    .price-card-popular { transform: scale(1); }
    .price-card-popular:hover { transform: translateY(-4px); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .nav-toggle { display: flex; }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .hero { padding: 110px 0 60px; }
    .hero h1 { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-header h2 { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; }
    .screenshot-track { padding: 0 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .cta h2 { font-size: 1.6rem; }

    .phone-frame {
        width: 240px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.9rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-stats { gap: 20px; }
    .stat-number { font-size: 1.1rem; }
}

/* ===== Language Switcher ===== */
.lang-switcher {
    position: relative;
    margin-left: 8px;
    margin-right: 8px;
    z-index: 1001;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(26, 82, 118, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.lang-toggle:hover {
    border-color: var(--primary-light);
    background: rgba(26, 82, 118, 0.1);
    color: var(--primary);
}

.lang-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lang-dropdown.open ~ .lang-toggle .lang-chevron,
.lang-toggle:focus .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    animation: langDropIn 0.2s ease;
}

.lang-dropdown.open {
    display: block;
}

@keyframes langDropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: left;
}

.lang-option:hover {
    background: rgba(26, 82, 118, 0.06);
    color: var(--primary);
}

.lang-option.active {
    background: rgba(26, 82, 118, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.lang-option.active::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--primary);
}

.lang-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-name {
    line-height: 1.2;
}

/* ===== RTL Support ===== */
html[dir="rtl"] body {
    text-align: right;
}

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

html[dir="rtl"] .hero-container {
    direction: rtl;
}

html[dir="rtl"] .hero-subtitle {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .hero-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-stats {
    flex-direction: row-reverse;
}

html[dir="rtl"] .feature-card {
    text-align: right;
}

html[dir="rtl"] .price-features {
    text-align: right;
}

html[dir="rtl"] .price-features li {
    flex-direction: row-reverse;
}

html[dir="rtl"] .faq-item summary {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .faq-item summary::after {
    margin-left: 0;
    margin-right: 16px;
}

html[dir="rtl"] .faq-item p {
    text-align: right;
}

html[dir="rtl"] .footer-grid {
    direction: rtl;
}

html[dir="rtl"] .footer-links {
    text-align: right;
}

html[dir="rtl"] .footer-brand p {
    text-align: right;
}

html[dir="rtl"] .legal-content {
    text-align: right;
}

html[dir="rtl"] .legal-content ul {
    margin: 0 24px 16px 0;
}

html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switcher {
    margin-left: 8px;
    margin-right: 8px;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .lang-option {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .lang-option.active::after {
    margin-left: 0;
    margin-right: auto;
}

/* ===== Language Switcher Responsive ===== */
@media (max-width: 768px) {
    .lang-switcher {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        margin: 0;
        z-index: 9999;
    }

    html[dir="rtl"] .lang-switcher {
        right: auto;
        left: 20px;
    }

    .lang-toggle {
        background: var(--bg);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border);
        padding: 10px 16px;
        border-radius: 100px;
        font-size: 0.85rem;
    }

    .lang-dropdown {
        bottom: calc(100% + 8px);
        top: auto;
        right: 0;
    }

    html[dir="rtl"] .lang-dropdown {
        right: auto;
        left: 0;
    }

    .lang-current-text {
        display: none;
    }

    .lang-toggle::before {
        content: '🌐';
        font-size: 1.2rem;
    }
}
