/********** Template CSS **********/
:root {
  --primary: #65b530;
  --primary-light: #7fc550;
  --primary-dark: #4c8e20;
  --secondary: #9b9b9b;
  --light: #f5f5f5;
  --dark: #161616;
  --dark-alt: #222222;
}

body {
  scroll-behavior: smooth;
  color: var(--dark);
}

.fw-medium {
  font-weight: 500 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-black {
  font-weight: 900 !important;
}

.fw-light {
  font-weight: 300 !important;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 45px;
  bottom: 45px;
  z-index: 99;
}

/* Logo Styling */
.logo-container {
  display: flex;
  align-items: center;
}

.logo-icon {
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-svg {
  filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-svg {
  transform: scale(1.05);
}

.logo-text h2 {
  transition: color 0.3s ease;
  letter-spacing: -0.5px;
}

.logo-text h2 span {
  color: var(--dark);
  transition: color 0.3s ease;
}

.logo-container:hover .logo-text h2 {
  color: var(--primary-dark);
}

.logo-container:hover .logo-text h2 span {
  color: var(--primary-light);
}

/* Dark Section Styling */
.bg-dark-alt {
  background-color: var(--dark-alt);
}

.section-dark {
  background-color: var(--dark);
  color: var(--light);
}

.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5 {
  color: var(--light);
}

.section-dark .bg-white {
  background-color: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-dark .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.section-dark .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.section-dark .btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.section-dark .text-dark {
  color: var(--light) !important;
}

/* Button Enhancement */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.5s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: -1;
  transition: all 0.5s ease;
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(101, 181, 48, 0.3);
}

/* Card Enhancement */
.service-item {
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-item img {
  transition: all 0.5s ease;
}

.service-item:hover img {
  transform: scale(1.05);
}

/* Contact Section Enhancement */
#contact .border {
  border-radius: 10px;
  transition: all 0.3s ease;
}

#contact .border:hover {
  box-shadow: 0 10px 30px rgba(101, 181, 48, 0.2);
  transform: translateY(-5px);
}

/* FAQ Enhancement */
.accordion-button {
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  color: var(--dark);
  background-color: var(--light);
  border-radius: 8px !important;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.accordion-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background-color: var(--primary);
  opacity: 0;
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed)::before {
  opacity: 1;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  box-shadow: none;
}

.accordion-button.collapsed {
  color: var(--dark);
}

.accordion-button:focus {
  box-shadow: none;
}

.accordion-body {
  padding: 1.5rem;
  line-height: 1.8;
}

.section-dark .accordion-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light);
}

.section-dark .accordion-button.collapsed {
  color: rgba(255, 255, 255, 0.9);
}

.section-dark .accordion-button:not(.collapsed) {
  color: var(--primary-light);
  background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Enhancement */
#home .position-relative::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--dark), transparent);
  z-index: 1;
}

/* Footer Enhancement */
.footer {
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--primary),
    transparent
  );
}

/*** 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;
}

/*** Button ***/
.btn {
  font-weight: 500;
  transition: 0.5s;
}

.btn.btn-primary {
  color: #ffffff;
}

.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;
}

/*** Navbar ***/
.navbar.sticky-top {
  top: -100px;
  transition: 0.5s;
}

.navbar .navbar-brand {
  height: 75px;
}

.navbar .navbar-nav .nav-link {
  margin-right: 30px;
  padding: 25px 0;
  color: var(--dark);
  font-weight: 500;
  outline: none;
  transition: color 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar.bg-white {
  background-color: #ffffff !important;
}

.navbar.bg-white .navbar-nav .nav-link {
  color: var(--dark);
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 991.98px) {
  .navbar .navbar-nav .nav-link {
    margin-right: 0;
    padding: 10px 0;
  }

  .navbar .navbar-nav {
    border-top: 1px solid #eeeeee;
  }
}

@media (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    border: none;
    margin-top: 0;
    top: 150%;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
  }

  .navbar .nav-item:hover .dropdown-menu {
    top: 100%;
    visibility: visible;
    transition: 0.5s;
    opacity: 1;
  }
}

.navbar .btn:hover {
  color: #ffffff !important;
  background: var(--primary) !important;
}

/*** Header ***/
.header-carousel .carousel-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  background: rgba(22, 22, 22, 0.7);
}

@media (max-width: 768px) {
  .header-carousel .owl-carousel-item {
    position: relative;
    min-height: 500px;
  }

  .header-carousel .owl-carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .header-carousel .owl-carousel-item h5,
  .header-carousel .owl-carousel-item p {
    font-size: 14px !important;
    font-weight: 400 !important;
  }

  .header-carousel .owl-carousel-item h1 {
    font-size: 30px;
    font-weight: 600;
  }
}

.header-carousel .owl-nav {
  position: absolute;
  width: 200px;
  height: 45px;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 45px;
  font-size: 22px;
  transition: 0.5s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.header-carousel .owl-dots {
  position: absolute;
  height: 45px;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-carousel .owl-dot {
  position: relative;
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 15px;
  transition: 0.5s;
}

.header-carousel .owl-dot::after {
  position: absolute;
  content: "";
  width: 5px;
  height: 5px;
  top: 4px;
  left: 4px;
  background: #ffffff;
  border-radius: 5px;
}

.header-carousel .owl-dot.active {
  background: var(--primary);
  border-color: var(--primary);
}

.page-header {
  background: linear-gradient(rgba(22, 22, 22, 0.7), rgba(22, 22, 22, 0.7)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--light);
}

/*** About ***/
@media (min-width: 992px) {
  .container.about {
    max-width: 100% !important;
  }

  .about-text {
    padding-right: calc(((100% - 960px) / 2) + 0.75rem);
  }
}

@media (min-width: 1200px) {
  .about-text {
    padding-right: calc(((100% - 1140px) / 2) + 0.75rem);
  }
}

@media (min-width: 1400px) {
  .about-text {
    padding-right: calc(((100% - 1320px) / 2) + 0.75rem);
  }
}

/* About Section Enhancement */
#about {
  background-color: var(--light);
}

#about .about-text {
  color: var(--dark);
}

#about h2 {
  color: var(--dark);
}

#about p {
  color: var(--dark);
}

#about .btn-square {
  background-color: var(--light);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#about h5 {
  color: var(--dark);
  font-weight: 600;
}

/*** Service ***/
.service-row {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.08);
}

.service-item {
  border-color: rgba(0, 0, 0, 0.03) !important;
}

.service-item .btn {
  width: auto;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 30px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.service-item .btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(101, 181, 48, 0.3);
}

/*** Feature ***/
@media (min-width: 992px) {
  .container.feature {
    max-width: 100% !important;
  }

  .feature-text {
    padding-left: calc(((100% - 960px) / 2) + 0.75rem);
  }
}

@media (min-width: 1200px) {
  .feature-text {
    padding-left: calc(((100% - 1140px) / 2) + 0.75rem);
  }
}

@media (min-width: 1400px) {
  .feature-text {
    padding-left: calc(((100% - 1320px) / 2) + 0.75rem);
  }
}

/*** Project Portfolio ***/
#portfolio-flters li {
  display: inline-block;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  transition: 0.5s;
  border-bottom: 2px solid transparent;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
  color: var(--primary);
  border-color: var(--primary);
}

.portfolio-inner {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.07);
}

.portfolio-inner img {
  transition: 0.5s;
}

.portfolio-inner:hover img {
  transform: scale(1.1);
}

.portfolio-inner .portfolio-text {
  position: absolute;
  width: 100%;
  left: 0;
  bottom: -50px;
  opacity: 0;
  transition: 0.5s;
}

.portfolio-inner:hover .portfolio-text {
  bottom: 0;
  opacity: 1;
}

/*** Quote ***/
@media (min-width: 992px) {
  .container.quote {
    max-width: 100% !important;
  }

  .quote-text {
    padding-right: calc(((100% - 960px) / 2) + 0.75rem);
  }
}

@media (min-width: 1200px) {
  .quote-text {
    padding-right: calc(((100% - 1140px) / 2) + 0.75rem);
  }
}

@media (min-width: 1400px) {
  .quote-text {
    padding-right: calc(((100% - 1320px) / 2) + 0.75rem);
  }
}

/*** Team ***/
.team-item {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.08);
}

.team-item img {
  transition: 0.5s;
}

.team-item:hover img {
  transform: scale(1.1);
}

.team-item .team-social {
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 22, 22, 0.7);
  opacity: 0;
  transition: 0.5s;
}

.team-item:hover .team-social {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 1;
}

.team-item .team-social .btn {
  opacity: 0;
}

.team-item:hover .team-social .btn {
  opacity: 1;
}

/*** Testimonial ***/
.testimonial-carousel {
  display: flex !important;
  flex-direction: column-reverse;
  max-width: 700px;
  margin: 0 auto;
}

.testimonial-carousel .owl-dots {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.testimonial-carousel .owl-dots .owl-dot {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 5px;
  transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
  width: 100px;
  height: 100px;
}

.testimonial-carousel .owl-dots .owl-dot::after {
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  content: "\f10d";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--primary);
  background: #ffffff;
  border-radius: 40px;
  transition: 0.5s;
  opacity: 0;
}

.testimonial-carousel .owl-dots .owl-dot.active::after {
  opacity: 1;
}

.testimonial-carousel .owl-dots .owl-dot img {
  border-radius: 60px;
  opacity: 0.4;
  transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
  opacity: 1;
}

/*** Contact ***/
@media (min-width: 992px) {
  .container.contact {
    max-width: 100% !important;
  }

  .contact-text {
    padding-left: calc(((100% - 960px) / 2) + 0.75rem);
  }
}

@media (min-width: 1200px) {
  .contact-text {
    padding-left: calc(((100% - 1140px) / 2) + 0.75rem);
  }
}

@media (min-width: 1400px) {
  .contact-text {
    padding-left: calc(((100% - 1320px) / 2) + 0.75rem);
  }
}

/*** Footer ***/
.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  text-align: left;
  color: var(--secondary);
  font-weight: normal;
  text-transform: capitalize;
  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 {
  color: var(--primary);
  letter-spacing: 1px;
  box-shadow: none;
}

/* Animation Classes - Remove service items */
.animated {
  animation-duration: 0.8s;
  animation-fill-mode: both;
}

.animated-onload {
  opacity: 0;
}

.animated-onload.animated {
  animation-name: fadeInUp;
  opacity: 1;
}

/* Only apply animations to bg-white and contact borders, not service items */
.bg-white,
#contact .border {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.bg-white.animated,
#contact .border.animated {
  opacity: 1;
  transform: translateY(0);
}

.btn-shadow {
  box-shadow: 0 5px 15px rgba(101, 181, 48, 0.4);
}

/* Keyframe Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Improve dark mode compatibility */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--dark);
    color: var(--light);
  }

  .bg-white {
    background-color: var(--dark-alt) !important;
    color: var(--light);
  }

  .bg-light {
    background-color: var(--dark-alt) !important;
    color: var(--light) !important;
  }

  #about.bg-light {
    background-color: var(--dark) !important;
  }

  #about .about-text {
    background-color: var(--dark-alt) !important;
  }

  #about h2,
  #about p,
  #about h5 {
    color: var(--light) !important;
  }

  .navbar.bg-white {
    background-color: var(--dark) !important;
  }

  .navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link.active {
    color: var(--primary-light) !important;
  }

  .navbar .navbar-toggler {
    background-color: var(--light);
  }

  .navbar-toggler-icon {
    filter: invert(1);
  }

  .logo-text h2 span {
    color: var(--light);
  }

  .accordion-button {
    background-color: var(--dark-alt);
    color: var(--light);
  }

  .accordion-body {
    background-color: var(--dark-alt);
    color: var(--light);
  }

  .text-dark {
    color: var(--light) !important;
  }

  .border {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .btn-square.bg-white {
    background-color: var(--dark) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Fix navbar text in dark mode */
  .navbar-nav .nav-link.text-dark {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .navbar-nav .nav-link.text-dark:hover,
  .navbar-nav .nav-link.text-dark.active {
    color: var(--primary-light) !important;
  }
}

/* Section transitions */
.container-fluid {
  position: relative;
  overflow: hidden;
}

.container-fluid::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent);
  z-index: 1;
}

.section-dark::after {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.05), transparent);
}

/* Color Enhancement for Consistent Theme */
.bg-light {
  background-color: var(--light) !important;
}

.bg-dark {
  background-color: var(--dark) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
}

/* Improve contrast in light backgrounds */
.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light h5,
.bg-light h6,
.bg-light p {
  color: var(--dark);
}

/* Make sure all icon colors are consistent */
.text-primary i {
  color: var(--primary) !important;
}

/* Ensure consistent border colors */
.border {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

.section-dark .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
