/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  color: white;
  z-index: 1000;
  padding: 10px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.5s ease, padding 0.3s ease,
    box-shadow 0.3s ease;
}

header.scrolled {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 35px 35px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .dropdown.hide-on-mobile {
    display: none;
  }
}

/* Navigation */
nav {
  z-index: 3;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 20px;
}

nav ul li img {
  width: 100px;
  height: auto;
}

nav ul li a {
  color: #008000;
  text-decoration: none;
  font-size: 25px;
}

nav ul li a:hover {
  color: #ff9000;
}


/* Dropdown Button */
.dropbtn {
  background-color: transparent;
  color: #008000;
  padding: 10px 16px;
  font-size: 25px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* Dropdown Container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown Content */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: transparent;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  gap: 20px;
}

/* Links Inside the Dropdown */
.dropdown-content a {
  color: #008000;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 25px;
}

/* Hover Effects for Dropdown */
.dropdown-content a:hover {
  background-color: #008000;
  color: #ff9000;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #ff9000;
}

/* Right Section (Search, Contact) */
.right-section {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 30px;
}

.separator {
  width: 1px;
  background-color: #008000;
  height: 30px;
}

.search-icon {
  cursor: pointer;
  color: #008000;
}

.search-icon:hover {
  color: #ff9000;
}

.contact {
  font-size: 25px;
  color: #008000;
  text-decoration: none;
}

.contact:hover {
  color: #ff9000;
}

/* Search Popup */
.search-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 1000;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.overlay.active,
.search-popup.active {
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 50vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #008000;
  text-align: center;
  font-size: 2.5rem;
}

/* Hero Images for Different Pages */
.hero.service {
  background-image: url('../images/servicemain.jpeg');
}

.hero.project {
  background-image: url('../images/projectmain.jpg');
}

.hero.people {
  background-image: url('../images/peoplemain.jpg');
}

.hero.contact {
  background-image: url('../images/contactmain.jpg');
}

.hero.contact h1 {
  color: #008000;
}

.hero.contact h1:hover {
  color: #008000;
}

/* Section with text below the image */
.text-section {
  padding: 20px;
  text-align: center;
  color: #008000;
}

/* Container for captioned images */
.image-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

.image-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 150px;
  overflow: hidden;
  position: relative;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Image Caption Styles */
.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: #008000;
  padding: 10px;
  border-radius: 5px;
}

/* Hover Effect for Image Caption */
.image-box:hover .caption {
  background-color: rgba(0, 0, 0, 0.9);
  color: #ff9000;
}

/* Main Content */
main {
  padding: 20px;
}

/* Ensure all images in the main section are the same size as project images */
main .image-box {
  width: 200px;
  height: 150px;
}

main .image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

section {
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

section:not(:last-child) {
  border-bottom: 2px solid #008000;
}

/* Containers for Services, Projects, and People */
.service-container,
.project-container,
.people-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.service-item,
.project-item,
.people-item {
  position: relative;
  width: 200px;
  overflow: hidden;
}

.service-item img,
.project-item img,
.people-item img {
  width: 100%;
  height: auto;
  display: block;
}

#service .service-item,
#project .project-item,
#people .people-item {
  position: relative;
  display: inline-block;
}

#service .caption,
#project .caption,
#people .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: #008000;
  padding: 10px;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover Effect for Image Caption */
:root {
  --hover-bg-color: rgba(0, 0, 0, 0.9);
  --hover-text-color: #ff9000;
}

#service .service-item:hover .caption,
#project .project-item:hover .caption,
#people .people-item:hover .caption {
  background-color: var(--hover-bg-color);
  color: var(--hover-text-color);
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: #808080;
  color: #fff;
}

/* Slideshow */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin-top: 0;
}

.slide {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: transparent;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  opacity: 1;
}

/* Slideshow Caption Styles */
.slidecaption {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #008000;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover Effect for Slideshow Caption */
.slidecaption:hover {
  background-color: rgba(0, 0, 0, 0.7);
  color: #ff9000;
}

/* Slideshow Navigation */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  color: #008000;
  font-weight: bold;
  font-size: 18px;
  border-radius: 0 3px 3px 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  left: 0;
  border-radius: 3px 0 0 3px;
}

/* Font Face */
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Regular.woff2') format('woff2'),
    url('fonts/Montserrat-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Bold.woff2') format('woff2'),
    url('fonts/Montserrat-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}
