:root {
  --primary: #008dd1;
  --light: #f3f6f8;
  --dark: #0e2e50;
  --grey: #899aa5;
}

html {
  position: relative;
  min-height: 100%;
  font-family: Roboto, sans-serif;
}

body {
  margin-bottom: 400px; /* Margin bottom by footer height */
}

video {
  max-width: 80%;
}

.accordion-button:not(.collapsed) {
  color: var(--dark);
  background-color: var(--light);
}

a {
  border-color: var(--primary);
  color: var(--primary);
}

.benefit-icon {
  font-size: 1.5rem;
  color: var(--dark);
  width: 2.5rem;
  text-align: center;
}

.testimonial-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
}

.anchor {
  display: block;
  position: relative;
  top: -50px;
  visibility: hidden;
}

#project_map {
  height: 400px;
}

.bg-rps {
  background-color: var(--primary) !important;
}

.rps-highlight {
  background-color: var(--grey) !important;
  color: var(--light);
}

.bg-box-title-rps {
  background-color: var(--primary) !important;
  color: var(--light) !important;
  display: inline;
  padding: 0.1rem;

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 1px var(--primary),
    0 0 8px var(--primary);
}

.project-image {
  max-width: 400px;
  width: 100%;
}

.project-placeholder-image {
  max-width: 400px;
  width: 100%;
  filter: grayscale(20%);
}

.career-image {
  max-width: 100px;
  width: 100%;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease-out,
    visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition:
    opacity 0.5s ease-out,
    visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 45px;
  bottom: 45px;
  z-index: 99;
}

.my-6 {
  margin-top: 6rem;
  margin-bottom: 6rem;
}

.py-6 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/*** Button ***/
.btn {
  font-weight: 500;
  transition: 0.5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
  color: var(--light);
}

.btn-square {
  width: 38px;
  height: 38px;
}

.btn-sm-square {
  width: 32px;
  height: 32px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
  border-radius: 50px;
}

/*** Navbar ***/
.navbar .navbar-nav .nav-link {
  position: relative;
  margin-left: 25px;
  padding: 35px 0;
  color: var(--dark);
  font-weight: 500;
  outline: none;
  transition: 0.5s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.sticky-top.navbar .navbar-nav .nav-link {
  padding: 20px 0;
  color: var(--dark);
}

.sticky-top.navbar .navbar-nav .nav-link:hover,
.sticky-top.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar .navbar-brand h1 {
  color: var(--dark);
}

.navbar .navbar-brand img {
  max-height: 60px;
  transition: 0.5s;
}

.sticky-top.navbar .navbar-brand img {
  max-height: 45px;
}

@media (max-width: 991.98px) {
  .sticky-top.navbar {
    position: relative;
    background: var(--light);
  }

  .navbar .navbar-collapse {
    margin-top: 15px;
    border-top: 1px solid #dddddd;
  }

  .navbar .navbar-nav .nav-link,
  .sticky-top.navbar .navbar-nav .nav-link {
    padding: 10px 0;
    margin-left: 0;
    color: var(--dark);
  }

  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
  }

  .navbar .navbar-brand h1 {
    color: var(--primary);
  }

  .navbar .navbar-brand img {
    max-height: 45px;
  }
}

@media (min-width: 992px) {
  .navbar {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    border-bottom: 1px solid rgba(256, 256, 256, 0.2);
    z-index: 999;
    background: var(--light);
  }

  .sticky-top.navbar {
    position: fixed;
    background: var(--light);
  }

  .navbar .navbar-nav .nav-link::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 2px;
    bottom: 10px;
    left: 0;
    background: var(--light);
    opacity: 0;
    transition: 0.5s;
  }

  .sticky-top.navbar .navbar-nav .nav-link::before {
    background: var(--primary);
  }

  .navbar .navbar-nav .nav-link:hover::before,
  .navbar .navbar-nav .nav-link.active::before {
    bottom: -1px;
    left: 0;
    opacity: 1;
  }

  .navbar .navbar-nav .nav-link.nav-contact::before {
    display: none;
  }

  .sticky-top.navbar .navbar-brand h1 {
    color: var(--primary);
  }

  .navbar .nav-item .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    transition: 0.5s;
    opacity: 0;
  }

  .navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    transition: 0.5s;
    opacity: 1;
  }
}

.partners-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 50px 80px;
}

.partners-text {
  flex: 0 0 30%;
  padding-right: 20px;
  border-right: 2px solid #f0f0f0;
}

.partners-text h2 {
  font-size: 1.3rem;
  color: var(--grey);
  margin: 0;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-grow: 1;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-height: 80px;
  max-width: 130px;
  width: auto;
  opacity: 0.7;
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
  filter: grayscale(100%);
}

.logo-item img:hover {
  opacity: 1;
  transform: scale(1.3);
  filter: grayscale(0%);
}

.ecovadis-rating-text {
  color: var(--grey);
  font-weight: bold;
}

@media (max-width: 768px) {
  .partners-container {
    flex-direction: column;
    text-align: center;
  }

  .partners-text {
    flex: 0 0 auto;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }

  .partners-logos {
    justify-content: center;
    width: 100%;
  }
}

/*** Hero Header ***/

.hero-header-index {
  margin-bottom: 6rem;
  padding: 12rem 0 5rem 0;
  background:
    linear-gradient(rgba(15, 15, 31, 0.6), rgba(15, 15, 31, 0.6)),
    url(/img/backgrounds/index.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-title {
  font-size: 4rem;
  color: var(--primary);

  text-shadow:
    1px 1px 0 var(--light),
    -1px 1px 0 var(--light),
    -1px -1px 0 var(--light),
    1px -1px 0 var(--light);
}

.hero-header-subtitle {
  font-size: 1.25rem;
  color: var(--light);
}

.hero-header-service {
  padding: 10rem 0 4rem 0;
  background:
    linear-gradient(rgba(20, 20, 31, 0.6), rgba(20, 20, 31, 0.6)),
    url(/img/backgrounds/lastplanner.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-team {
  padding: 10rem 0 4rem 0;
  background:
    linear-gradient(rgba(20, 20, 31, 0.6), rgba(20, 20, 31, 0.6)),
    url(/img/backgrounds/teamwork.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-career {
  padding: 10rem 0 4rem 0;
  background:
    linear-gradient(rgba(20, 20, 31, 0.6), rgba(20, 20, 31, 0.6)),
    url(/img/backgrounds/office.webp);
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-projects {
  padding: 10rem 0 4rem 0;
  background:
    linear-gradient(rgba(20, 20, 31, 0.6), rgba(20, 20, 31, 0.6)),
    url(/img/backgrounds/rail_horizontal.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-blog {
  padding: 10rem 0 4rem 0;
  background:
    linear-gradient(rgba(20, 20, 31, 0.6), rgba(20, 20, 31, 0.6)),
    url(/img/backgrounds/bg_blog.webp);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-header-generic {
  padding: 10rem 0 4rem 0;
  background-color: var(--primary);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  text-shadow:
    1px 1px 0 var(--light),
    -1px 1px 0 var(--light),
    -1px -1px 0 var(--light),
    1px -1px 0 var(--light);
}

.page-header {
  margin-bottom: 6rem;
  padding: 12rem 0 6rem 0;
}

@media (max-width: 991.98px) {
  .hero-header {
    padding: 6rem 0 9rem 0;
  }

  .page-header {
    padding: 6rem 0;
  }
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: var(--light);
}

.breadcrumb .breadcrumb-item {
  color: var(--primary);
}

/*** Service ***/
.service-item {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.07);
  border: 1px solid transparent;
  transition: 0.5s;
}

.service-item:hover {
  box-shadow: none;
  border-color: var(--primary);
}

.service-item .service-icon,
.service-item .service-btn {
  margin: -1px 0 0 -1px;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  background: var(--primary);
  border-radius: 5px 0;
  transition: 0.5s;
}

.service-item .service-btn {
  margin: -1px -1px 0 0;
  border-radius: 0 5px;
  opacity: 0;
}

.service-item:hover .service-btn {
  opacity: 1;
}

/*** Projects view ****/

.project-image {
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
}

.project-image:hover img {
  filter: grayscale(100%); /* Turn image to black and white on hover */
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  background: rgba(
    0,
    0,
    0,
    0.5
  ); /* Optional: dark background for better visibility */
}

.project-image:hover .overlay {
  opacity: 1; /* Show overlay on hover */
}

.link-icon {
  color: white;
  font-size: 2rem; /* Adjust size as needed */
}

.project-name {
  text-align: center;
  margin-top: 10px;
}

.filter-label {
  cursor: pointer;
  margin-right: 15px;
  font-weight: bold;
  position: relative;
}

.filter-label.active {
  text-decoration: underline; /* Underline for active label */
}

/*** Testimonial ***/
.projects-carousel .owl-item .testimonial-item {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.07);
  border: 1px solid transparent;
  transform: scale(0.85);
  transition: 0.5s;
}

.projects-carousel .owl-item.center .testimonial-item {
  box-shadow: none;
  border-color: var(--primary);
  transform: scale(1);
}

.projects-carousel .owl-item.center .testimonial-item a {
  border-color: var(--primary);
  font-size: 1.1rem;
  color: var(--primary);
}

.projects-carousel .owl-item .testimonial-item img {
  width: 200px;
  height: 200px;
}

.projects-carousel .owl-nav {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.projects-carousel .owl-nav .owl-prev,
.projects-carousel .owl-nav .owl-next {
  margin: 0 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 45px;
  transition: 0.5s;
}

.projects-carousel .owl-nav .owl-prev:hover,
.projects-carousel .owl-nav .owl-next:hover {
  color: var(--light);
  background: var(--primary);
}

/*** Team ***/
.team-item {
  position: relative;
  padding: 30px;
  text-align: center;
  transition: 0.5s;
  z-index: 1;
  background-color: var(--light);
}

.team-item h5,
.team-item p {
  transition: 0.5s;
}

@media screen and (min-width: 800px) {
  .team-item:hover img {
    transform: scale(1.1);
    filter: grayscale(1);
  }

  .team-item:hover {
    background-color: var(--grey);
  }
}

.team-item img {
  padding: 5px;
  border: 1px solid var(--primary);
}

/*** Footer ***/
.footer .btn.btn-social {
  margin-right: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  border: 1px solid rgba(256, 256, 256, 0.1);
  border-radius: 40px;
  transition: 0.3s;
}

.footer .btn.btn-social:hover {
  color: var(--primary);
}

.footer .btn.btn-link {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  text-align: left;
  color: var(--light);
  font-weight: normal;
  transition: 0.3s;
}

.footer .btn.btn-link::before {
  position: relative;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  letter-spacing: 1px;
  box-shadow: none;
}

.footer .copyright {
  padding: 25px 0;
  font-size: 14px;
  border-top: 1px solid rgba(256, 256, 256, 0.1);
}

.footer .copyright a {
  color: var(--light);
}

.footer .footer-menu a {
  margin-right: 15px;
  padding-right: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .footer-menu a:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: none;
}

.railroad-track {
  position: relative;
  width: 100%; /* Full width of the parent */
  height: 60px; /* Height to accommodate rails, sleepers, fasteners, and ballast */
  background-color: var(--light);
  overflow: hidden;
}

/* Top rail */
.railroad-track::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--primary);
  z-index: 3;
}

/* Bottom rail */
.railroad-track::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--primary);
  z-index: 3;
}

/* Sleepers (ties) */
.railroad-track .sleepers {
  position: absolute;
  top: 0px;
  bottom: 18px;
  left: 0;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    var(--primary) 0,
    var(--primary) 3px,
    /* Sleeper width */ transparent 3px,
    transparent 30px /* Sleeper spacing */
  );
  background-size: 30px 100%;
  z-index: 2;
}

/* Fasteners (between rails and sleepers) */
.railroad-track .fasteners {
  position: absolute;
  top: 10px;
  bottom: 24px;
  left: 0;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    var(--primary) 0,
    var(--primary) 1px,
    /* Fastener width */ transparent 1px,
    transparent 30px /* Fastener spacing */
  );
  background-repeat: repeat-x;
  background-position: top, bottom;
  height: 100%;
  z-index: 1;
}

/* Ballast (gravel beneath sleepers) */
.railroad-track .ballast {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    var(--primary) 0,
    var(--primary) 2px,
    transparent 2px,
    transparent 6px
  );
  background-size: 6px 100%;
  z-index: 0;
}

.stats-section {
  background: var(--light);
  border-radius: 20px;
  padding: 40px;
  margin-top: 60px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--primary-color);
  font-size: 1rem;
}
