/* Base Styles */
:root {
    --primary-color: #4a90e2; /* A calming blue */
    --secondary-color: #f4f7f6; /* Light grey background */
    --text-color: #333;
    --heading-color: #2c3e50; /* Darker blue-grey for headings */
    --white-color: #fff;
    --light-text: #555;
    --border-color: #ddd;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

/* Language Switcher Styles */
.language-switcher {
    margin-left: 1rem; /* Adjust spacing as needed */
    display: flex; /* Align buttons */
    align-items: center; /* Center vertically */
}

.lang-button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    margin: 0 0.2rem;
    border-radius: 3px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.lang-button:hover {
    color: var(--primary-color);
}

.lang-button.active {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1); /* Light primary background */
}

/* RTL Styles */
html[dir="rtl"] {
    /* Basic RTL adjustments */
    text-align: right;
}

html[dir="rtl"] .navbar .container {
    flex-direction: row-reverse; /* Reverse items in navbar */
}

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

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0; /* Underline from right */
}

html[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem; /* Adjust margin for RTL */
}

html[dir="rtl"] .menu-toggle {
    /* Adjust if needed for RTL */
}

html[dir="rtl"] section h2::after {
    left: auto;
    right: 50%;
    transform: translateX(50%); /* Adjust underline position */
}

html[dir="rtl"] .service-item,
html[dir="rtl"] .about-section .container,
html[dir="rtl"] .contact-section .container,
html[dir="rtl"] .footer {
    text-align: right; /* Ensure text aligns right */
}

html[dir="rtl"] #contact-form {
    /* Adjust form elements if needed */
}

html[dir="rtl"] #contact-form button {
    align-self: flex-end; /* Align button to the right */
}

/* Adjust grid/flex layouts for RTL if necessary */
html[dir="rtl"] .row {
     /* Example: May need flex-direction: row-reverse depending on layout */
}

/* Adjust specific element margins/paddings for RTL */
html[dir="rtl"] ul {
    padding-left: 0;
    padding-right: 20px; /* Example adjustment for lists */
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    html[dir="rtl"] .nav-links {
        left: auto;
        right: 0; /* Position mobile menu on the right */
        text-align: right;
    }

    html[dir="rtl"] .nav-links li {
        margin-right: 0; /* Reset margin for mobile */
    }

    html[dir="rtl"] .language-switcher {
        /* Adjust positioning if needed on mobile */
        margin-right: 0.5rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

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

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--light-text);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: darken(var(--primary-color), 10%);
}

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

/* Navbar */
.navbar {
    background-color: var(--white-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo img {
    height: 50px; /* Adjust as needed */
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 400;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--heading-color);
    margin: 5px 0;
    transition: all var(--transition-speed);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(74, 144, 226, 0.7), rgba(74, 144, 226, 0.5)), url('photos/fotor-ai-20250205154858.jpg') no-repeat center center/cover;
    color: var(--white-color);
    text-align: center;
    padding: 12rem 0 8rem; /* Adjust padding top to account for fixed navbar */
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    color: var(--white-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    border: 2px solid transparent;
    cursor: pointer;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--white-color);
    border-color: var(--white-color);
}

/* Section Base Styles */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: var(--secondary-color);
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-section .container {
    max-width: 800px;
    text-align: center;
}

/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-item {
    background-color: var(--white-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-item img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop images nicely */
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.service-item h3 {
    margin-bottom: 0.5rem;
}

/* Gallery Section */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.image-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), opacity var(--transition-speed);
    cursor: pointer;
}

.image-gallery img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Contact Section */
.contact-section .container {
    max-width: 700px;
    text-align: center;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

#contact-form input,
#contact-form textarea {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

#contact-form textarea {
    resize: vertical;
}

#contact-form button {
    align-self: center; /* Center button */
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
}

#contact-form button:hover {
    background-color: darken(var(--primary-color), 10%);
    color: var(--white-color);
    border-color: transparent;
}

/* Footer */
.footer {
    background-color: var(--heading-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem; /* Add some space before footer */
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .navbar .container {
        position: relative;
    }

    .nav-links {
        display: none; /* Hide on mobile initially */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below navbar */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links li {
        margin: 1rem 0;
        margin-left: 0; /* Reset margin */
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
    }

    /* Animate hamburger icon */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-section {
        padding: 10rem 0 6rem; /* Adjust padding for mobile */
    }

    section {
        padding: 3rem 0;
    }
}

/* Language Switcher Styles */
.language-switcher {
    margin-left: 1rem; /* Adjust spacing as needed */
    display: flex; /* Align buttons */
    align-items: center; /* Center vertically */
}

.lang-button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    margin: 0 0.2rem;
    border-radius: 3px;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.lang-button:hover {
    color: var(--primary-color);
}

.lang-button.active {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1); /* Light primary background */
}

/* RTL Styles */
html[dir="rtl"] {
    /* Basic RTL adjustments */
    text-align: right;
}

html[dir="rtl"] .navbar .container {
    flex-direction: row-reverse; /* Reverse items in navbar */
}

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

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0; /* Underline from right */
}

html[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem; /* Adjust margin for RTL */
}

html[dir="rtl"] .menu-toggle {
    /* Adjust if needed for RTL */
}

html[dir="rtl"] section h2::after {
    left: auto;
    right: 50%;
    transform: translateX(50%); /* Adjust underline position */
}

html[dir="rtl"] .service-item,
html[dir="rtl"] .about-section .container,
html[dir="rtl"] .contact-section .container,
html[dir="rtl"] .footer {
    text-align: right; /* Ensure text aligns right */
}

html[dir="rtl"] #contact-form {
    /* Adjust form elements if needed */
}

html[dir="rtl"] #contact-form button {
    align-self: flex-end; /* Align button to the right */
}

/* Adjust grid/flex layouts for RTL if necessary */
html[dir="rtl"] .row {
     /* Example: May need flex-direction: row-reverse depending on layout */
}

/* Adjust specific element margins/paddings for RTL */
html[dir="rtl"] ul {
    padding-left: 0;
    padding-right: 20px; /* Example adjustment for lists */
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    html[dir="rtl"] .nav-links {
        left: auto;
        right: 0; /* Position mobile menu on the right */
        text-align: right;
    }

    html[dir="rtl"] .nav-links li {
        margin-right: 0; /* Reset margin for mobile */
    }

    html[dir="rtl"] .language-switcher {
        /* Adjust positioning if needed on mobile */
        margin-right: 0.5rem;
    }
}
