:root {
    --primary-color: #0097D9;
    --primary-dark: #007bb0;
    --secondary-color: #FFFFFF;
    --background-color: #F1F1F1;
    --text-color: #333333;
    --text-light: #666666;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Global Focus & Hover States for Accessibility */
a:focus, button:focus, .btn:focus, input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Code Snippet Styling */
.code-snippet-container {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.code-snippet-container pre {
    margin: 0;
    overflow-x: auto;
}

.code-snippet-container code {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #d4d4d4;
    font-size: 0.9rem;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Breadcrumbs */
.breadcrumb {
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 151, 217, 0.3);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0; /* Thinner header */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.logo img {
    height: 32px; /* Smaller logo */
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Subtle gradient placeholder, or use image */
    background: url('media/Background%20section.jpeg') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85); /* Overlay to ensure text readability */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    gap: 40px;
    flex-direction: row-reverse; /* Reordered: Image Left, Text Right */
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

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

.hero-img {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Sections General */
.section-padding {
    padding: 80px 0;
}

.bg-white {
    background-color: var(--secondary-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-color);
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-direction: row-reverse; /* Default: Content Left, Image Right */
}

/* Zigzag Layout - Swapped */
.feature-row:nth-child(even) {
    flex-direction: row; /* Even: Image Left, Content Right */
}

.feature-image {
    flex: 1;
    height: auto;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    background-color: white;
    padding: 20px;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Remove old card styles if no longer needed, or keep for reference */
.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.feature-row:hover .feature-image img {
    transform: scale(1.03);
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

/* Download Section */
.download-section {
    background-color: #e6f7ff;
    text-align: center; /* Ensure center alignment */
}

.download-box {
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1); /* Deeper shadow */
    display: inline-block;
    max-width: 800px;
    width: 100%;
    margin: 0 auto; /* Centering */
    border: 1px solid rgba(0, 151, 217, 0.1); /* Subtle border */
    position: relative;
}

.download-box::before {
    content: '★ 100% Secure';
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e6f7ff;
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.os-icon {
    height: 60px;
    margin-bottom: 20px;
}

.version-info {
    margin-bottom: 30px;
    font-weight: 600;
    color: var(--text-light);
}

.small-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.review-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
}

.review-text {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.reviewer {
    font-weight: bold;
    color: var(--text-color);
}

.trust-badges {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    opacity: 0.7;
}

.trust-badges img {
    height: 40px;
    filter: grayscale(100%);
    transition: var(--transition);
}

.trust-badges img:hover {
    filter: grayscale(0%);
}

/* FAQ Section Modernized */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #eee; /* Clean border */
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Hover effect on container */
    border-color: #ddd;
}

.faq-question {
    width: 100%;
    padding: 25px 30px; /* More padding */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700; /* Bold */
    font-size: 1.2rem; /* Larger font */
    color: var(--text-color);
    background: white;
    border: none;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.faq-question:hover {
    background-color: #fcfcfc;
    color: var(--primary-color); /* Hover effect on text */
}

/* Icon Styling */
.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-weight: 400;
    line-height: 1;
    margin-left: 15px;
}

/* Rotate + to x when expanded */
.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

/* Separator Line Logic */
.faq-question[aria-expanded="true"] {
    border-bottom: 1px solid #eee; /* Separator line when open */
    background-color: #f9f9f9; /* Subtle background for active question */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    background-color: white;
    opacity: 0;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    opacity: 1;
}

.faq-answer p {
    padding: 25px 30px;
    color: var(--text-light);
    font-size: 1rem; /* Smaller than question */
    line-height: 1.7; /* Readable line height */
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-question {
        padding: 20px;
        font-size: 1.1rem;
    }
    
    .faq-answer p {
        padding: 20px;
    }
}


/* Languages Section */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.language-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px 10px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.language-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
    background: #fff;
}

.language-item .flag {
    font-size: 2rem;
    margin-bottom: 10px;
    line-height: 1;
}

.language-item .lang-name {
    font-size: 0.95rem;
    color: #444;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* Responsive Languages */
@media (max-width: 768px) {
    .languages-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .languages-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 10px;
    }
    
    .language-item {
        flex-direction: row;
        padding: 15px 20px;
        justify-content: flex-start;
    }
    
    .language-item .flag {
        margin-bottom: 0;
        margin-right: 15px;
        font-size: 1.8rem;
    }
    
    .language-item .lang-name {
        font-size: 1rem;
        text-align: left;
    }
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.lang-btn {
    background-color: transparent;
    color: var(--text-color);
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid rgba(0,0,0,0.05);
}

.lang-content a {
    color: var(--text-color);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    text-align: left;
}

.lang-content a:hover {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

.lang-dropdown:hover .lang-content {
    display: block;
}

/* RTL Support for Dropdown */
html[lang="ar"] .lang-content {
    right: auto;
    left: 0;
    text-align: right;
}

html[lang="ar"] .lang-content a {
    text-align: right;
}

/* Reviews Marquee */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.review-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    width: 300px; /* Fixed width for consistent marquee */
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.reviewer {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: auto;
}

.review-rating {
    color: #ffc107;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 60px 0 20px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: #777;
    font-size: 0.85rem;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: -100px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background-color: var(--primary-color); /* Brand color */
    color: white;
    box-shadow: 0 10px 30px rgba(0, 151, 217, 0.4);
    padding: 12px 30px;
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50px;
    border: none;
}

.sticky-cta.visible {
    bottom: 30px; /* Elevated position */
}

.sticky-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-content span {
    font-weight: 600;
    font-size: 1rem;
    display: none; /* Hide text on mobile to save space, show on desktop */
}

.sticky-cta .btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 25px;
}

.sticky-cta .btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .sticky-content span {
        display: block;
        color: white;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .sticky-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Language Specific Overrides */

/* Russian (RU) - Increased Button Padding */
html[lang="ru"] .btn {
    padding-left: 32px;
    padding-right: 32px;
}
html[lang="ru"] .btn-lg {
    padding-left: 40px;
    padding-right: 40px;
}
html[lang="ru"] .btn-xl {
    padding-left: 50px;
    padding-right: 50px;
}

/* Chinese (CN) - Letter Spacing for Navigation */
html[lang="zh-CN"] .nav-links a,
html[lang="zh-Hans"] .nav-links a {
    letter-spacing: 1px;
}

/* Arabic (AR) - RTL Layout */
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

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

html[lang="ar"] .hero-text, 
html[lang="ar"] .feature-content,
html[lang="ar"] .section-title,
html[lang="ar"] .download-box {
    text-align: right;
}

html[lang="ar"] .feature-row:nth-child(even) {
    flex-direction: row; /* Reset zigzag for RTL */
}
html[lang="ar"] .feature-row:nth-child(odd) {
    flex-direction: row-reverse; /* Mirror zigzag */
}

/* Fix specific elements for RTL */
html[lang="ar"] .review-card {
    border-left: none;
    border-right: 5px solid var(--primary-color);
}

html[lang="ar"] .faq-question {
    text-align: right;
    flex-direction: row-reverse; 
}

html[lang="ar"] .faq-toggle {
    margin-left: 0;
    margin-right: auto;
}

html[lang="ar"] .download-box::before {
    left: 20px;
    right: auto;
}

html[lang="ar"] .copy-btn {
    left: 10px;
    right: auto;
}

html[lang="ar"] .breadcrumb {
    text-align: right;
}
