:root {
    --bg-color: #1a1a1a; /* Main background color */
    --text-color: #e0e0e0;
    --primary-color: #4a90e2;
    --secondary-color: #2c2c2c; /* Background for feature/FAQ items */
    --accent-color: #17e2b1;
    --border-radius: 8px;
    --font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    line-height: 1.6;
}

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

/* Main Header */
.main-header {
    padding: 0.5rem 0;
    position: sticky;
    background-color: var(--bg-color);
    top: 0;
    z-index: 1000;
}

.main-header .container {
    padding-top: 0;
    padding-bottom: 0;
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-icon {
    height: 40px;
    width: 40px;
    border-radius: var(--border-radius);
}

.header-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Flag Icon Styles */
.flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-selector-button {
    background-color: transparent;
    border: 1px solid #444;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.language-selector-button:hover {
    background-color: #3a3a3a;
}

.language-selector-button .arrow-down {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.language-selector-button[aria-expanded="true"] .arrow-down {
    transform: rotate(180deg);
}

.language-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 110%;
    right: 0;
    background-color: #3a3a3a;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow: hidden;
    width: 160px;
    padding: 0.5rem 0;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-color);
}

.hero-main-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.hero .logo {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    margin-top: 0;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    margin-top: 0;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.btn:hover {
    transform: translateY(-5px);
}

.store-badge {
    height: 50px;
    width: auto;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #242424; /* Slightly lighter than main background for contrast */
}

.features h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
}

.features h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
}

/* Carousel Wrapper Styles */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Carousel Navigation Arrows */
.carousel-nav {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 1rem 0.5rem;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    border-radius: var(--border-radius);
    opacity: 0.7;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.carousel-nav.left-arrow {
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.carousel-nav.right-arrow {
    right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.carousel-nav.hidden {
    opacity: 0;
    pointer-events: none; /* Disables click events when hidden */
}

/* Feature Carousel Styles */
.feature-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Hide scrollbar for a cleaner look */
.feature-carousel::-webkit-scrollbar {
    display: none;
}

.feature-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.feature-item {
    flex-shrink: 0;
    scroll-snap-align: center;
    width: 350px;
    max-width: 100%;
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.feature-item h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem; /* Reduced space below the title */
}

.feature-item p {
    color: var(--text-color);
    margin-top: 0; /* Removes default space before the paragraph */
}

.screenshot {
    width: 100%;
    height: 300px; /* Use fixed height for consistent alignment */
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: contain; /* 'contain' ensures the whole image fits and is centered */
}

/* FAQ Section */
.faq {
    padding: 4rem 2rem;
    text-align: center;
    background-color: #121212; /* Very dark, provides strong contrast with features */
}

.faq .container {
    max-width: 800px;
    margin: 0 auto;
}

.faq h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
}

.faq h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
}

.faq-item {
    background-color: var(--secondary-color);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.faq-item p {
    color: var(--text-color);
    margin-top: 0;
    line-height: 1.5;
}

/* Bottom Download CTA Section */
.bottom-download-cta {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #1f1f1f; /* Darker than features, lighter than FAQ */
    /* Removed borders */
}

.bottom-download-cta h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
}

.bottom-download-cta h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
}

/* Disclaimer Section */
.disclaimer {
    padding: 2rem;
    text-align: center;
    font-style: italic;
    color: #888;
    background-color: var(--bg-color); /* Matches main body background */
}

/* Main Footer */
.main-footer {
    background-color: #0d0d0d; /* Darkest section */
    color: #888;
    padding: 1.5rem 0;
    text-align: center;
    /* Removed border-top */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero .logo {
        font-size: 2.5rem;
    }

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

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

    /* Carousel adjustment for smaller screens */
    .feature-carousel {
        padding: 1rem 0;
        gap: 1rem;
    }

    .feature-item {
        width: 85%;
    }

    /* Remove max-width for FAQ container on smaller screens */
    .faq .container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero-main-image {
        max-width: 100%;
    }

    .carousel-nav {
        padding: 0.75rem 0.25rem;
        font-size: 1.5rem;
    }
}

/* RTL Language Support */
html[dir="rtl"] .header-logo {
    flex-direction: row-reverse;
}

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

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