/* Global Resets and Base Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px; /* Base font size */
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-weight: 700; /* Slightly bolder headings */
}

/* Light Theme (Default) */
:root {
    --background-color: #ffffff;
    --text-color: #212529; /* Darker grey for better readability */
    --primary-color: #000000;
    --secondary-color: #f8f9fa; /* Lighter grey for backgrounds */
    --accent-color: #495057; /* Medium grey for less emphasis text */
    --border-color: #dee2e6;
    --nav-background-scrolled: rgba(255, 255, 255, 0.85); /* More opaque on scroll */
    --nav-background-top: rgba(255, 255, 255, 0.0); /* Transparent at top */
    --nav-text-color: #000000;
    --nav-link-hover-bg: #e9ecef;
    --button-bg: #000000;
    --button-text: #ffffff;
    --button-hover-bg: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
body.dark-theme {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #ffffff;
    --secondary-color: #1e1e1e;
    --accent-color: #adb5bd;
    --border-color: #343a40;
    --nav-background-scrolled: rgba(18, 18, 18, 0.85);
    --nav-background-top: rgba(18, 18, 18, 0.0);
    --nav-text-color: #ffffff;
    --nav-link-hover-bg: #333333;
    --button-bg: #ffffff;
    --button-text: #000000;
    --button-hover-bg: #ced4da;
    --shadow-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Header and Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem; /* Increased padding */
    background-color: var(--nav-background-top);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent; /* Initially transparent border */
    position: fixed;
    top: 0;
    left: 0;
    right: 0; /* Added for RTL support */
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--nav-background-scrolled);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.navbar .logo {
    display: flex; /* For alignment if needed */
    align-items: center;
    padding: 0; /* Remove padding if it was for text */
}

.navbar .logo #company-logo {
    max-height: 40px; /* Adjust as needed */
    width: auto;
    display: block; /* Prevents extra space below image */
    transition: filter 0.3s ease; /* Smooth transition for filter change */
}

/* Styles for the text next to the logo */
.navbar .logo .logo-text {
    margin-left: 10px; /* Space between logo image and text */
    font-size: 1.6rem; /* Should match .navbar .logo if it was text */
    font-weight: bold;
    color: var(--nav-text-color);
    letter-spacing: 0.5px; /* Optional: adjust letter spacing */
}

/* Logo color for light theme */
body:not(.dark-theme) .navbar .logo #company-logo {
    filter: invert(100%);
}

/* Ensure original logo colors for dark theme (no filter) */
body.dark-theme .navbar .logo #company-logo {
    filter: none;
}

/* RTL adjustments for logo text */
html[dir="rtl"] .navbar .logo .logo-text {
    margin-left: 0;
    margin-right: 10px; /* Space between logo image and text in RTL */
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 2.5rem; /* Increased spacing */
}

/* RTL support for nav links */
html[dir="rtl"] .nav-links li {
    margin-left: 0;
    margin-right: 2.5rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between language and theme toggles */
}

#language-toggle-btn {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

#language-toggle-btn:hover {
    background: var(--button-hover-bg);
    border-color: var(--button-bg);
}

.nav-links a {
    color: var(--nav-text-color);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    position: relative;
    overflow: hidden; /* For potential underline animation */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--nav-text-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-links a:hover::after, .nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-links a.active {
    /* Active state might not need background if underline is prominent */
     background-color: transparent; /* Remove background for active if underline is preferred */
}

.nav-links a:hover {
    background-color: var(--nav-link-hover-bg);
}

.theme-switcher {
    display: flex;
    align-items: center;
}

.theme-switcher #theme-toggle {
    background: var(--button-bg);
    color: var(--button-text);
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem; /* Slightly larger */
    border-radius: 20px; /* Pill shape */
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-switcher #theme-toggle:hover {
    background: var(--button-hover-bg);
    border-color: var(--button-bg);
}

/* RTL adjustments for mobile menu toggle */
html[dir="rtl"] .mobile-menu-toggle {
    /* Potentially adjust if burger looks odd on the right */
}

/* Main Content Sections */
main {
    padding-top: 70px; /* Adjusted for navbar height */
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--background-color); 
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3.5rem; /* Larger hero title */
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem; /* Slightly larger hero text */
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-button {
    background: var(--primary-color);
    color: var(--background-color); /* Text color contrasts with primary */
    padding: 0.9rem 2.2rem;
    border-radius: 30px; /* Pill shape button */
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background: var(--background-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px var(--shadow-color);
}

/* Invert CTA for dark theme if button-bg is light */
body.dark-theme .cta-button {
    background: var(--button-bg); /* White in dark theme */
    color: var(--button-text);    /* Black in dark theme */
    border-color: var(--button-bg);
}

body.dark-theme .cta-button:hover {
    background: var(--background-color); /* Dark bg */
    color: var(--button-bg); /* White text */
}

.content-section {
    padding: 5rem 2rem; /* Increased padding */
    max-width: 960px; /* Wider content area */
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    font-size: 2.5rem; /* Larger section titles */
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.content-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-section ul {
    list-style: none; /* Remove default list style */
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    padding-left: 1.5em; /* Indent for custom bullet */
    position: relative;
}

.content-section li::before {
    content: "\2713"; /* Checkmark or other icon */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

body.dark-theme .content-section li::before {
    color: var(--accent-color);
}

.content-section a {
    color: var(--primary-color);
    font-weight: 600;
}

.content-section a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* RTL for list item pseudo-elements (like checkmarks in content sections) */
html[dir="rtl"] .content-section li {
    padding-left: 0;
    padding-right: 1.5em; /* Indent for custom bullet */
}

html[dir="rtl"] .content-section li::before {
    left: auto;
    right: 0;
}

/* RTL for form labels and inputs if needed */
html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .form-group select {
    background-position: left 0.8rem center;
}

/* Ensure close button is on the left for RTL modal */
html[dir="rtl"] .close-modal-btn {
    right: auto;
    left: 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1.5rem;
        flex-wrap: wrap; /* Allow wrapping for theme toggler */
    }

    .navbar .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        /* Basic mobile menu - can be improved with JS toggle */
        order: 3; /* Nav links below logo and toggle */
        width: 100%;
        flex-direction: column;
        margin-top: 0.5rem;
        background-color: var(--nav-background-scrolled); /* Ensure visibility */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .navbar.mobile-menu-open .nav-links {
        max-height: 500px; /* Adjust as needed */
        padding-bottom: 0.5rem;
    }

    .nav-links li {
        margin-left: 0;
        margin-bottom: 0.2rem;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem 1rem;
        text-align: left;
    }
    .nav-links a::after { /* Mobile nav links don't need underline */
        display: none;
    }

    .theme-switcher {
        order: 2; /* Theme toggle to the right of logo */
        margin-left: auto; /* Push to the far right */
    }

    /* Mobile Menu Burger Icon (Placeholder) */
    .mobile-menu-toggle {
        display: block; /* Show burger */
        order: 1;
        background: none;
        border: none;
        color: var(--nav-text-color);
        font-size: 1.8rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    main {
        padding-top: 60px; /* Adjust for potentially smaller mobile nav */
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }
    .content-section {
        padding: 3rem 1.5rem;
    }
}

/* Hide burger on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Centered Button Container */
.centered-button-container {
    text-align: center;
    margin-top: 2rem; /* Adjust as needed */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity for overlay */
    padding-top: 60px; /* Location of the box */
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin: 5% auto; /* 5% from the top and centered */
    padding: 25px;
    border: 1px solid var(--border-color);
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px; /* Maximum width */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.5s ease-out;
}

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

.close-modal-btn {
    color: var(--accent-color);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Form Group Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color-translucent, rgba(0,0,0,0.2)); /* Fallback if variable not defined */
}

body.dark-theme .form-group input[type="text"]:focus,
body.dark-theme .form-group input[type="email"]:focus,
body.dark-theme .form-group select:focus,
body.dark-theme .form-group textarea:focus {
    box-shadow: 0 0 0 2px var(--primary-color-translucent-dark, rgba(255,255,255,0.2)); /* Fallback if variable not defined */
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Fallback color: var(--accent-color) for light, a lighter grey for dark if --accent-color is too dark */
    /* Using a simple SVG, color will be inherited via 'fill' if not specified in SVG, or use a specific color */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23555555' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1em;
}

/* Style for select dropdown arrow in dark mode */
body.dark-theme .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23bbbbbb' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Solutions Section Styles */
.solutions-section {
    background-color: var(--secondary-color); /* Light grey background */
    padding: 4rem 2rem; /* Adjust padding as needed */
    /* border-bottom: 1px solid var(--border-color); */ /* Removing this if it was from content-section */
}

.solutions-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.solutions-section .section-intro {
    text-align: center;
    color: var(--accent-color);
    max-width: 700px;
    margin: 0 auto 3rem auto;
    line-height: 1.7;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 2rem;
    max-width: 1200px; /* Max width for the grid itself */
    margin: 0 auto;
}

.solution-card {
    background-color: var(--background-color); /* White card background */
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    /* text-align: center; */ /* If icons/text need to be centered within card */
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.solution-icon {
    margin-bottom: 1rem;
    /* text-align: left; */ /* Or center if preferred */
}

.solution-icon svg {
    width: 40px; /* Adjust size as needed */
    height: 40px;
    color: var(--primary-color); /* Icon color */
}

/* Styles for img icons in solution cards */
.solution-icon img {
    width: 40px; /* Adjust size as needed */
    height: 40px;
    object-fit: contain; /* Ensures the image scales nicely within the bounds */
}

body.dark-theme .solution-icon svg {
    color: var(--accent-color); /* Lighter icon color for dark theme if primary is too bright */
}

/* Make the black robot image white in dark theme */
body.dark-theme .solution-icon img[src="robot.gif"] {
    /* Experimental: Attempt to tint the inverted image towards --accent-color */
    filter: invert(100%) sepia(10%) saturate(200%) hue-rotate(180deg) brightness(100%) contrast(90%);
    /* Explanation of this attempt:
       - invert(100%): Makes the black robot white.
       - sepia(10%): Adds a slight yellowish/brownish tint to the white.
       - saturate(200%): Boosts the saturation to make the tint more apparent.
       - hue-rotate(180deg): Shifts hues. A starting point to get towards blue/grey from yellow.
                          You will likely need to adjust this value significantly (0-360deg).
       - brightness(100%): Adjust overall brightness.
       - contrast(90%): Adjust contrast.
       The key values to play with will be sepia, saturate, and especially hue-rotate.
    */
}

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

.solution-card p {
    font-size: 0.95rem;
    color: var(--accent-color);
    line-height: 1.6;
    flex-grow: 1; /* Ensures paragraphs in a row take same height if card heights are equalized */
}

/* Responsive adjustments for solutions grid if needed */
@media (max-width: 768px) {
    .solutions-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }
    .solutions-section {
        padding: 3rem 1.5rem;
    }
    .solution-card {
        padding: 1.5rem;
    }
} 