/* Global Resets and Base Styles */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #ff006e;
    --accent-color: #fb5607;
    --text-color: #333;
    --light-text-color: #f8f8f8;
    --bg-color-light: #f8f8f8;
    --bg-color-dark: #2c3e50;
    --border-color: #ddd;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --font-family-primary: 'Poppins', sans-serif;
    --font-family-secondary: 'Montserrat', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem units */
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s ease-in-out;
}

.skip-link:focus {
    top: 0;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Promo Banner */
.promo-banner {
    background-color: var(--accent-color);
    color: var(--light-text-color);
    padding: 0.8rem 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 999; /* Below header, above content */
    box-shadow: 0 2px 5px var(--shadow-light);
}

.promo-banner p {
    margin: 0;
}

.promo-banner .close-banner {
    background: none;
    border: none;
    color: var(--light-text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.promo-banner .close-banner:hover {
    transform: rotate(90deg);
}

/* Header */
.main-header {
    background-color: var(--bg-color-dark);
    color: var(--light-text-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container .logo {
    height: 40px; /* Adjust logo size */
    width: auto;
    margin-right: 0.5rem;
}

.logo-container .site-name {
    font-family: var(--font-family-secondary);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--light-text-color);
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    color: var(--light-text-color);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Hamburger Menu for Mobile */
.hamburger {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--light-text-color);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main Content Area */
.main-content {
    flex-grow: 1; /* Allows main content to take available space */
}

section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-header {
    margin-bottom: 3rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title {
    font-family: var(--font-family-secondary);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.section-icon {
    font-size: 2.2rem;
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    padding: 6rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 70vh;
}

.hero-title {
    font-family: var(--font-family-secondary);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex-grow: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
}

.search-box button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #e04b00; /* Darker accent */
}

.translation-result {
    background-color: white;
    color: var(--text-color);
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    text-align: left;
    box-shadow: 0 5px 15px var(--shadow-medium);
    min-height: 80px; /* Placeholder height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-style: italic;
}

/* Features Section */
.features-section {
    background-color: var(--bg-color-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.feature-item .feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-family: var(--font-family-secondary);
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.feature-item p {
    font-size: 0.95rem;
    color: #666;
}

/* About Section */
.about-section {
    background-color: #eef4f8; /* A subtle background */
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    text-align: left;
}

.about-content p {
    flex: 1;
    min-width: 300px;
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials-section {
    background-color: var(--bg-color-light);
}

.testimonials-slider {
    display: flex;
    overflow-x: auto; /* Allows horizontal scrolling if cards exceed width */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding-bottom: 1rem; /* Space for scrollbar */
    justify-content: flex-start; /* Align items to start */
}

.testimonial-card {
    flex: 0 0 320px; /* Fixed width for each card */
    scroll-snap-align: start;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-light);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px; /* Ensure consistent height */
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* Call to Action (CTA) Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--light-text-color);
    padding: 5rem 1.5rem;
}

.cta-title {
    font-family: var(--font-family-secondary);
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #3273db; /* Darker primary color, replaced darken() */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--light-text-color);
    border: 2px solid var(--light-text-color);
}

.btn-outline:hover {
    background-color: var(--light-text-color);
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Footer */
.main-footer {
    background-color: var(--bg-color-dark);
    color: var(--light-text-color);
    padding: 3rem 1.5rem;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    text-align: left;
}

.footer-logo {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    flex-basis: 200px; /* Minimum width */
}

.footer-logo img {
    height: 50px;
    width: auto;
    margin-bottom: 0.5rem;
}

.footer-logo .site-name {
    font-family: var(--font-family-secondary);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--light-text-color);
}

.footer-links, .footer-contact {
    flex-basis: 200px; /* Minimum width */
}

.footer-links h3, .footer-contact h3 {
    font-family: var(--font-family-secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-links ul li, .footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-links ul li a, .footer-contact p {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover, .footer-contact p:hover {
    color: var(--accent-color);
}

.footer-contact .social-icons a {
    color: var(--light-text-color);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer-contact .social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--shadow-medium);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 900;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .nav-links {
        display: none; /* Hide nav links by default on smaller screens */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        background-color: var(--bg-color-dark);
        padding: 1rem 0;
        padding-bottom: 3rem;
        box-shadow: 0 5px 10px var(--shadow-medium);
        z-index: 900;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links li {
        text-align: center;
        margin: 0.5rem 0;
    }

    .nav-links li a {
        padding: 0.8rem 1rem;
        display: block;
    }

    .hamburger {
        display: block; /* Show hamburger icon */
    }

    .nav-right {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links, .footer-contact, .footer-logo {
        flex-basis: auto;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .footer-links ul {
        padding: 0;
    }

    .footer-contact .social-icons {
        justify-content: center;
    }
}


/* General mobile menu styling for small screens */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none; /* Hidden by default on small screens */
        flex-direction: column;
        position: fixed; /* Position fixed relative to viewport */
        top: 0; /* Start from the very top */
        left: 0;
        width: 100%;
        height: 100%; /* Full height of the viewport */
        background-color: var(--bg-color-dark); /* Using dark background for the menu overlay */
        padding-top: 20px; /* Reduced padding from the top, adjust as needed (e.g., header height + some space) */
        overflow-y: auto; /* Enable scrolling if menu content is long */
        z-index: 1000; /* Ensure it's above other content */
        transition: transform 0.3s ease-in-out; /* Smooth transition */
        transform: translateX(100%); /* Initially off-screen to the right */
        align-items: center; /* Center menu items */
        justify-content: flex-start; /* Start items from the top */
    }

    /* When the nav-open class is on navbar, show the menu */
    .navbar.nav-open .nav-links {
        display: flex; /* Show the menu */
        transform: translateX(0); /* Slide into view */
    }

    .navbar .nav-links li {
        margin: 15px 0; /* Adjust vertical spacing between menu items */
        width: 100%; /* Make list items take full width for centering */
        text-align: center;
    }

    .navbar .nav-links a {
        padding: 10px 0; /* Padding for click area */
        display: block; /* Make the whole link clickable */
        font-size: 1.2rem; /* Larger font size for mobile */
        color: var(--light-text-color); /* Adjusted: Use light text color for readability */
        transition: color 0.3s ease; /* Add transition for hover effect */
    }

    .navbar .nav-links a:hover {
        color: var(--primary-color); /* Adjusted: Hover color for mobile menu links */
    }

    /* Hamburger button visibility on small screens */
    .navbar .hamburger {
        display: block; /* Make hamburger visible on small screens */
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: white; /* Adjust color as needed */
        z-index: 1001; /* Ensure it's above the menu overlay */
    }

    /* Hide standard nav links on larger screens and show hamburger */
    /* You likely already have rules for this, ensure consistency */
    @media (min-width: 769px) {
        .navbar .nav-links {
            display: flex; /* Show as flex row on larger screens */
            position: static; /* Reset position */
            transform: none; /* Reset transform */
            height: auto;
            background-color: var(--bg-color-dark);
            padding-top: 0;
            overflow-y: visible;
            color: var(--light-text-color); /* Ensure desktop links also use light color */
        }
        .navbar .hamburger {
            display: none; /* Hide hamburger on large screens */
        }
    }

    /* Optional: Style for no-scroll on body when menu is open */
    body.no-scroll {
        overflow: hidden;
    }
}

    /* Hide standard nav links on larger screens and show hamburger */
    /* You likely already have rules for this, ensure consistency */
    @media (min-width: 769px) {
        .navbar .nav-links {
            display: flex; /* Show as flex row on larger screens */
            position: static; /* Reset position */
            transform: none; /* Reset transform */
            height: auto;
            background-color: var(--bg-color-dark);
            padding-top: 0;
            overflow-y: visible;
            color: white;
        }
        .navbar .hamburger {
            display: none; /* Hide hamburger on large screens */
        }
    }

    /* Optional: Style for no-scroll on body when menu is open */
    body.no-scroll {
        overflow: hidden;
    }
}


@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cta-title {
        font-size: 1.6rem;
    }
}