/* General Body and Container Styles */
body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4; /* Lighter background for general sections */
  scroll-behavior: smooth; /* For smooth scrolling */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Headings */
h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  color: #2c3e50; /* Dark blue/grey for headings */
}

h2 {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 40px;
}

h3 {
  font-size: 2em;
  margin-bottom: 20px;
  text-align: center; /* Center section headings */
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: #7ac142; /* Primary green */
  color: #fff;
  border: 2px solid #7ac142;
}

.btn-primary:hover {
  background-color: #fff;
  color: #7ac142;
  border-color: #7ac142;
}

.btn-secondary {
  background-color: #7ac142; /* Secondary green */
  color: #fff;
  border: 2px solid #7ac142;
}

.btn-secondary:hover {
  background-color: #fff;
  color: #7ac142;
  border-color: #7ac142;
}

/* Header Styles */
.header {
  background-color: #fff;
  color: #333;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  position: sticky; /* Makes header stick to top */
  top: 0;
  z-index: 1000; /* Ensures header is above other content */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Dynamic Header properties */
  transform: translateY(0); /* Default state: visible */
  transition: transform 0.3s ease-out; /* Smooth transition for hiding/showing */
}

/* Class to hide header when scrolling down */
.header.header-hidden {
  transform: translateY(-100%); /* Move header completely up out of view */
}

.header .container {
  display: flex;
  justify-content: space-between; /* Spreads items: logo/text left, nav/button right */
  align-items: center;
  padding: 15px 20px;
  flex-wrap: nowrap; /* Prevents wrapping on desktop */
}

.header .logo {
  flex-basis: auto;
  flex-shrink: 0;
  margin-right: 0;
  display: flex; /* Use flex to align image and text */
  align-items: center;
  gap: 15px; /* Space between logo image and text */
}

.header .logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  padding: 0.5em;
  margin: 0;
  width: 10em; /* Desktop width for logo image */
  height: auto;
  max-width: 100%;
  display: block;
}

.logo-text {
  font-family: "Montserrat", sans-serif;
  color: #7ac142;
  font-size: 1.8em; /* Big and bold for desktop */
  font-weight: 700;
  white-space: normal; /* Allow text to wrap */
  overflow: hidden; /* Hide excess text beyond max-height */
  text-overflow: ellipsis; /* Add ellipsis if truncated (content goes beyond 2 lines) */
  display: block;
  line-height: 1.2; /* Tighter line height for two lines */
  max-height: 2.4em; /* Maximum height for exactly 2 lines (1.2em * 2 lines) */
  max-width: 550px; /* Increased max-width for desktop to fit the full text on two lines */
}

.navbar-desktop {
  display: flex;
  align-items: center;
}

.navbar-desktop ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 25px; /* Spacing between desktop navigation items */
}

.navbar-desktop ul li a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Language Switcher Styles (Single Toggle Button) */
.lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center; /* Center the single toggle link */
}

.lang-toggle-link {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between flag and text */
  text-decoration: none;
  color: #555; /* Default text color */
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: all 0.2s ease;
  background-color: #f0f0f0;
}

.lang-toggle-link:hover {
  background-color: #e0e0e0;
  border-color: #7ac142;
  color: #7ac142;
}

.lang-toggle-link .flag-icon {
  width: 25px; /* Adjust flag size within the toggle */
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-toggle-link .lang-text {
  font-size: 0.9em; /* Adjust text size */
  text-transform: uppercase;
}

/* IMPORTANT: Hide old flag wrapper styles if they exist */
.lang-icon-wrapper,
.lang-icon-wrapper.active-lang {
  display: none !important;
}

/* Hero Section */
.hero-section {
  background: url(../assets/images/background-hero-image.webp) no-repeat center
    center/cover;
  color: #fff;
  text-align: center;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  position: relative;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h2 {
  color: #fff;
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.3em;
  margin-bottom: 30px;
}

/* Section Common Styles */
section {
  padding: 80px 0;
  background-color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* About Us Section */
.about-section .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.about-content {
  flex: 2;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Our Services Section */
.services-section {
  background-color: #eaf6ff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-item {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-item img {
  border-radius: 0.1em;
  max-width: 20em;
  height: auto;
  margin-bottom: 15px;
}

.service-item h4 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #7ac142;
}

.service-item p {
  font-size: 0.95em;
  color: #666;
}

/* Contact Us Section */
.contact-section .container {
  text-align: center;
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
  align-items: flex-start;
}

.contact-form,
.contact-info {
  flex: 1;
  min-width: 400px; /* Adjusted for better desktop layout */
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
  font-size: 1em;
}

.form-group textarea {
  resize: vertical;
}

.contact-info h4 {
  color: #7ac142;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 8px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contact-info p i {
  color: #7ac142;
  font-size: 1.2em;
  margin-top: 4px;
}

.contact-info a {
  color: #7ac142;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #5aa12a;
  text-decoration: underline;
}

/* Footer Styles */
.footer {
  background-color: #2c3e50;
  color: #fff;
  padding: 30px 0;
  text-align: center;
  font-size: 0.9em;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Ensures items wrap on smaller screens */
  gap: 15px; /* Space between items when wrapped */
  text-align: center; /* Center content when stacked */
}

.footer p {
  flex-basis: 100%; /* Make copyright text take full width on small screens */
  margin: 0; /* Remove default paragraph margin */
}

.social-links {
  flex-basis: 100%; /* Make social links take full width on small screens */
  margin-top: 15px; /* Add some space above social links when stacked */
  text-align: center; /* Center the social links */
}

.social-links a {
  margin: 0 10px;
  color: #7ac142;
  font-size: 1.8em;
  transition: color 0.3s ease;
}
.social-links a:hover {
  color: #fff;
}

/* Hamburger Button Styles */
.hamburger {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  font-size: 1.8em;
  color: #7ac142;
  cursor: pointer;
  padding: 10px;
  outline: none;
  transition: transform 0.2s ease;
}

.hamburger:hover {
  transform: scale(1.1);
}

/* Mobile Navigation Styles */
.navbar-mobile {
  position: fixed;
  top: 0;
  left: 0; /* Default LTR position */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transform: translateX(-100%); /* Start off-screen to the left for LTR */
  transition: transform 0.3s ease-out, visibility 0s 0.3s, opacity 0.3s ease-out;
  visibility: hidden;
  opacity: 0;
}

.navbar-mobile.active {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
  transition: transform 0.3s ease-out, visibility 0s 0s, opacity 0.3s ease-out;
}

.navbar-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.navbar-mobile ul li {
  margin: 25px 0;
}

.navbar-mobile ul li a {
  text-decoration: none;
  color: #fff;
  font-size: 1.8em;
  font-weight: 600;
  transition: color 0.3s ease;
}

.navbar-mobile ul li a:hover {
  color: #7ac142;
}

.navbar-mobile .btn {
  font-size: 1.2em;
  padding: 10px 20px;
}

.close-mobile-menu {
  position: absolute;
  top: 20px;
  right: 20px; /* Default LTR position */
  background: none;
  border: none;
  font-size: 2.5em;
  color: #fff;
  cursor: pointer;
  outline: none;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px; /* For LTR */
  background-color: #7ac142;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px); /* Start slightly off-screen */
  z-index: 990; /* Below mobile menu, above content */
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Responsive Design - Media Queries */
@media (max-width: 992px) {
  /* Header adjustments for tablets and smaller */
  .header .container {
    flex-direction: row;
    justify-content: space-between; /* Keeps logo/text left, hamburger right */
    align-items: center;
    padding: 10px 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens if needed */
    gap: 0; /* Remove gap on container for mobile */
  }

  .header .logo {
    margin-right: 0;
    justify-content: flex-start;
    flex-grow: 1;
    max-width: calc(100% - 70px); /* Adjust based on hamburger button width */
    gap: 5px; /* Smaller gap between logo image and text on mobile */
  }

  .logo-img {
    max-height: 55px; /* Adjusted to be clearly larger than text height on tablets */
    width: auto;
    padding: 0.2em;
  }

  .logo-text {
    font-size: 1.1em; /* Smaller font size for logo text on mobile */
    max-width: 250px; /* Increased max-width for tablets to fit the full text on two lines */
    white-space: normal; /* Allow text to wrap on mobile */
    overflow: hidden; /* Hide excess text beyond max-height for 2-line limit */
    text-overflow: ellipsis; /* Add ellipsis if content exceeds 2 lines on mobile */
    line-height: 1.2;
    max-height: 2.64em; /* Max height for exactly 2 lines on mobile (1.1em * 1.2 * 2) */
  }

  /* Only show hamburger on smaller screens */
  .hamburger {
    display: block;
    color: #7ac142;
  }

  .navbar-desktop {
    display: none; /* Hide desktop nav on smaller screens */
  }

  .lang-toggle-link {
    width: auto; /* Allow button to size based on content */
    height: auto;
    padding: 10px 15px; /* Adjust padding for mobile button */
  }

  .lang-toggle-link .flag-icon {
    width: 30px; /* Larger flag for mobile toggle */
    height: 22px;
  }

  /* Footer adjustments */
  .footer .container {
    flex-direction: column;
    padding: 20px;
  }

  .contact-form,
  .contact-info {
    min-width: 300px; /* Adjusted for tablet layout */
  }
}

@media (max-width: 480px) {
  /* Further adjustments for very small mobile screens */
  .hero-content h2 {
    font-size: 2em;
  }

  .hero-content p {
    font-size: 1em;
  }

  h2 {
    font-size: 1.8em;
  }

  h3 {
    font-size: 1.5em;
  }

  .logo-img {
    max-height: 45px; /* Even smaller logo for very small screens, still bigger than text */
  }

  .logo-text {
    font-size: 0.9em; /* Even smaller font size for logo text */
    max-width: 160px; /* Adjusted max-width for very small screens to fit the full text on two lines */
    overflow: hidden; /* Hide excess text for 2-line limit */
    text-overflow: ellipsis; /* Add ellipsis if content exceeds 2 lines */
    line-height: 1.2;
    max-height: 2.16em; /* Max height for exactly 2 lines on smallest screens (0.9em * 1.2 * 2) */
  }

  .contact-form,
  .contact-info {
    min-width: unset; /* Remove fixed min-width for very small screens */
    width: 100%; /* Ensure they take full width */
    padding: 20px;
  }

  .service-item {
    padding: 20px;
  }
}
