/* General Styles */
body {
  font-family: "Open Sans", sans-serif; /* Modern, readable font */
  margin: 0;
  padding: 0;
  background-color: #f5f5dc; /* Light beige background */
  color: #333; /* Dark gray text */
  line-height: 1.7;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[dir="rtl"] {
  font-family: "Arial", sans-serif;
  direction: rtl;
  text-align: right;
}

.container {
  max-width: 1100px; /* Slightly narrower for a cleaner look */
  margin: 0 auto;
  padding: 20px; /* Adjusted container padding for better responsiveness */
}

.section-title {
  font-size: 2.5em; /* Slightly smaller title for better flow */
  color: #208080; /* Deep teal */
  text-align: center;
  margin-bottom: 30px; /* Reduced margin */
  position: relative;
  padding-bottom: 10px; /* Reduced padding */
}

.section-title::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px; /* Reduced width */
  height: 2px; /* Reduced height */
  background-color: #208080;
}

.new-button {
  display: inline-block;
  background-color: #208080; /* Deep teal button */
  color: #f5f5dc; /* Light beige text on teal */
  padding: 12px 25px; /* Reduced padding */
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1em; /* Reduced font size */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.new-button:hover {
  background-color: #145252; /* Darker teal on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.new-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(280px, 1fr)
  ); /* Further adjusted minmax */
  gap: 25px; /* Reduced gap */
  margin-top: 1.5em; /* Reduced margin */
}

/* Header */
.new-header {
  background-color: #5b43017a; /* Light beige header */
  color: #b1b1b1;
  padding: 0.05em 20px; /* Reduced vertical and horizontal padding */
  box-shadow: 0 2px 5px rgba(103, 102, 102, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.new-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px; /* Further reduced logo height */
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
}

.logo:hover img {
  transform: scale(1.05);
}

.new-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.new-nav ul li {
  margin-left: 0.8em; /* Further reduced left margin */
}

.new-nav ul li a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.05em; /* Reduced font size for links */
  font-weight: bold;
  padding: 0.5em 7px; /* Add vertical padding for touch targets */
}

.new-nav ul li a:hover {
  color: rgb(252, 244, 224); /* Teal hover */
}

.language-switcher {
  display: flex;
  align-items: center;
  margin-left: 2em; /* Adjust spacing */
}

.lang-button {
  background: none;
  border: none;
  color: #0d4c4c;
  font-size: 0.9em;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
}

.lang-button:hover {
  color: #6de8e8;
}

.lang-separator {
  color: rgb(59, 173, 10);
  margin: 0 0.3em;
  font-size: 1em;
}

.new-nav ul li select {
  display: none; /* Hide the old select */
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  color: #555;
  font-size: 1.3em; /* Slightly smaller hamburger icon */
  cursor: pointer;
}

/* Hero Section */
.new-hero {
  position: relative;
  overflow: hidden;
  padding: 120px 100px; /* Adjusted padding */
  text-align: center;
  background: none; /* Remove background color */
  color: #333;
}

.hero-background-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Place behind the content */
}

.hero-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the area */
  opacity: 0;
  transition: opacity 1s ease-in-out; /* Smooth fade effect */
  background-size: cover; /* Ensure background covers the hero */
  background-position: center; /* Center the background image */
}

.hero-background-image.active {
  opacity: 1;
}

/* Inline styles to set the background images dynamically */
.hero-background-carousel .hero-background-image:nth-child(1) {
  background-image: url("project_1.jpeg");
}

.hero-background-carousel .hero-background-image:nth-child(2) {
  background-image: url("project_2.jpeg");
}

.hero-background-carousel .hero-background-image:nth-child(3) {
  background-image: url("project_3.jpeg");
}

.hero-background-carousel .hero-background-image:nth-child(4) {
  background-image: url("project_4.jpeg");
}

.hero-background-carousel .hero-background-image:nth-child(5) {
  background-image: url("project_5.jpeg");
}

.new-hero-content {
  background-color: rgba(255, 255, 255, 0.8); /* Light overlay */
  padding: 40px; /* Reduced padding */
  border-radius: 12px;
  display: inline-block;
  position: relative; /* Ensure content is above background */
  z-index: 1;
}

.new-hero-content h1 {
  font-size: 2.8em; /* Reduced font size */
  margin-bottom: 0.6em; /* Reduced margin */
  color: #208080; /* Deep teal title */
  line-height: 1.2;
}

.new-hero-content p {
  font-size: 1.1em; /* Reduced font size */
  color: #555;
  margin-bottom: 1.5em; /* Reduced margin */
}

/* Projects Section */
.new-projects-section {
  padding: 60px 0; /* Reduced padding */
  background-color: #f5f5dc; /* Light beige */
}

.project-item {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px; /* Reduced padding */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
  border: 1px solid #eee;
}

.project-item:hover {
  transform: translateY(-3px); /* Less pronounced hover */
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 15px; /* Reduced margin */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.project-item h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.2em; /* Reduced font size */
  margin-bottom: 0.5em; /* Reduced margin */
}

.project-item p {
  color: #777;
  line-height: 1.6;
  font-size: 0.95em; /* Reduced font size */
}

.view-button {
  display: inline-block;
  background-color: transparent;
  color: #208080; /* Teal view button */
  padding: 8px 15px; /* Reduced padding */
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
  cursor: pointer;
  border: 2px solid #208080;
  margin-top: 1em; /* Reduced margin */
  font-size: 0.9em; /* Reduced font size */
}

.view-button:hover {
  background-color: #208080;
  color: #f5f5dc;
}

/* About Section */
.new-about-section {
  padding: 60px 0; /* Reduced padding */
  background-color: #e0f2f2; /* Light teal */
}

.new-about-content {
  display: flex;
  align-items: center;
  gap: 30px; /* Reduced gap */
  padding: 0 20px;
}

.new-profile-image {
  width: 150px; /* Reduced size */
  height: 150px; /* Reduced size */
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 3px solid #f5f5dc; /* Reduced border size */
}

.about-text p {
  font-size: 1em; /* Reduced font size */
  color: #555;
  line-height: 1.7; /* Slightly reduced line height */
  margin-bottom: 10px; /* Reduced margin */
}

/* Contact Section */
.new-contact-section {
  padding: 60px 0; /* Reduced padding */
  background-color: #f5f5dc; /* Light beige */
  text-align: center;
}

.new-contact-form {
  max-width: 550px; /* Further reduced width */
  margin: 20px auto 0; /* Reduced margin */
  display: flex;
  flex-direction: column;
  gap: 20px; /* Reduced gap */
  padding: 30px; /* Reduced padding */
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.new-contact-form .form-group {
  margin-bottom: 15px; /* Reduced margin */
}

.new-contact-form input[type="text"],
.new-contact-form input[type="tel"],
.new-contact-form input[type="email"],
.new-contact-form textarea {
  padding: 10px 15px; /* Reduced padding */
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em; /* Reduced font size */
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.new-contact-form input:focus,
.new-contact-form textarea:focus {
  outline: none;
  border-color: #208080;
  box-shadow: 0 0 5px rgba(32, 128, 128, 0.5);
}

.new-contact-form textarea {
  resize: vertical;
  min-height: 140px; /* Reduced height */
}

.new-contact-form button[type="submit"] {
  background-color: #208080; /* Deep teal submit button */
  color: #f5f5dc; /* Light beige text */
  padding: 12px 25px; /* Reduced padding */
  border: none;
  border-radius: 8px;
  font-size: 1em; /* Reduced font size */
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.new-contact-form button[type="submit"]:hover {
  background-color: #145252; /* Darker teal on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  padding: 2em 0;
  text-align: center;
}

footer .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.footer-section {
  margin-bottom: 1.5em;
  text-align: left;
}

.footer-section h4 {
  font-size: 1.1em;
  margin-bottom: 0.8em;
  border-bottom: 1px solid #555;
  padding-bottom: 0.5em;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li a {
  text-decoration: none;
  color: #eee;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5em;
}

.footer-section ul li a:hover {
  color: #00aaff;
}

.footer-section.contact-info p {
  margin-bottom: 0.5em;
}

.footer-section.social .social-links {
  display: flex;
  gap: 1em;
  float: right;
  padding: 100px;
}

.social-links a {
  color: #eee;
  font-size: 1.3em;
  margin: 10px;
}
.social-links a :hover {
  color: #2990bf;
}

.footer-bottom {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #555;
  font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .section-title {
    font-size: 2.2em;
    margin-bottom: 25px;
  }

  .new-header .container {
    flex-direction: row; /* Reset to row for mobile nav button */
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    margin-bottom: 0;
  }

  .new-nav {
    width: 100%;
    display: none; /* Hide nav on smaller screens initially */
    margin-top: 1em;
  }

  .new-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #f5f5dc;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 1em;
  }

  .new-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .new-nav ul li {
    margin: 0.6em 0;
    margin-left: 0;
  }

  .new-nav ul li:last-child {
    margin-top: 0.8em;
  }

  .language-switcher {
    margin-left: 0; /* Adjust for stacked layout */
    margin-top: 0.5em;
  }

  .hamburger-menu {
    display: block;
    font-size: 1.2em; /* Adjust hamburger icon size */
  }

  .new-hero {
    padding: 100px 0;
  }

  .new-hero-content {
    padding: 30px;
  }

  .new-hero-content h1 {
    font-size: 2.4em;
  }

  .new-hero-content p {
    font-size: 1em;
  }

  .new-about-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .new-profile-image {
    margin-bottom: 1em;
    width: 120px;
    height: 120px;
  }

  .new-footer .container {
    flex-direction: column;
    gap: 0.4em;
    text-align: center;
  }

  .new-social-links {
    margin-top: 0.4em;
  }
}

/* Further Responsiveness for smaller screens */
@media (max-width: 480px) {
  .section-title {
    font-size: 2em;
  }

  .new-hero {
    padding: 80px 0;
  }

  .new-hero-content {
    padding: 20px;
  }

  .new-hero-content h1 {
    font-size: 2em;
  }

  .new-hero-content p {
    font-size: 0.9em;
  }

  .new-contact-form {
    padding: 20px;
  }

  .new-contact-form input[type="text"],
  .new-contact-form input[type="email"],
  .new-contact-form textarea {
    font-size: 0.9em;
  }

  .new-button,
  .view-button,
  .new-contact-form button[type="submit"] {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .new-about-content {
    padding: 0 15px;
  }

  .new-profile-image {
    width: 100px;
    height: 100px;
  }

  .new-nav ul li {
    margin: 0.5em 0;
  }

  .language-switcher {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.5em;
  }

  .lang-separator {
    display: none; /* Hide separator in stacked layout */
  }

  .lang-button {
    margin-right: 0.5em;
  }
}

/* Fixed WhatsApp Icon */
.whatsapp-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366; /* WhatsApp Green */
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  z-index: 1000; /* Ensure it's on top of other elements */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.whatsapp-icon:hover {
  background-color: #128c7e; /* Darker WhatsApp Green */
  transform: scale(1.1);
}

/* Responsive adjustments for WhatsApp icon */
@media (max-width: 768px) {
  .whatsapp-icon {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .whatsapp-icon {
    bottom: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 18px;
  }
}
