/********** Template CSS **********/
:root {
  --primary: #b22222; /* Firebrick red, perfect for chimney business */
  --secondary: #d2691e; /* Chocolate/brick color for accents */
  --light: #f8f4e3; /* Warm light color instead of blue */
  --dark: #2b2118; /* Dark brown, similar to soot */
  --accent: #ff8c00; /* Fire orange accent */
  --gray: #5a5a5a; /* Medium gray for text */
  --bs-primary: var(--primary); /* Override Bootstrap's primary color */
  --bs-secondary: var(--secondary); /* Override Bootstrap's secondary color */
}

/*** Spinner ***/
.spinner {
  width: 40px;
  height: 40px;
  background: var(--primary);
  margin: 100px auto;
  -webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
  animation: sk-rotateplane 1.2s infinite ease-in-out;
}

@-webkit-keyframes sk-rotateplane {
  0% {
    -webkit-transform: perspective(120px);
  }
  50% {
    -webkit-transform: perspective(120px) rotateY(180deg);
  }
  100% {
    -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg);
  }
}

@keyframes sk-rotateplane {
  0% {
    transform: perspective(120px) rotateX(0deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
    -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
  }
  100% {
    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
    -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
  }
}

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

/*** Heading ***/
h1,
h2,
.fw-bold {
  font-weight: 800 !important;
}

h3,
h4,
.fw-semi-bold {
  font-weight: 700 !important;
}

h5,
h6,
.fw-medium {
  font-weight: 600 !important;
}

/*** Button ***/
.btn {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  transition: 0.5s;
}

.btn-primary,
.btn-secondary {
  color: #ffffff;
  box-shadow: inset 0 0 0 50px transparent;
}

.btn-primary:hover {
  box-shadow: inset 0 0 0 0 var(--primary);
}

.btn-secondary:hover {
  box-shadow: inset 0 0 0 0 var(--secondary);
}

.btn-square {
  width: 36px;
  height: 36px;
}

.btn-sm-square {
  width: 30px;
  height: 30px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
  font-family: "Nunito", sans-serif;
  position: relative;
  margin-left: 25px;
  padding: 35px 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  outline: none;
  transition: 0.5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
  padding: 20px 0;
  color: var(--dark);
}

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

.navbar-dark .navbar-brand h1 {
  color: #ffffff;
}

.navbar-dark .navbar-toggler {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

@media (max-width: 991.98px) {
  .sticky-top.navbar-dark {
    position: relative;
    background: #ffffff;
  }

  .navbar-dark .navbar-nav .nav-link,
  .navbar-dark .navbar-nav .nav-link.show,
  .sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 10px 0;
    color: var(--dark);
  }

  .navbar-dark .navbar-brand h1 {
    color: var(--primary);
  }
}

@media (min-width: 992px) {
  .navbar-dark {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    border-bottom: 1px solid rgba(256, 256, 256, 0.1);
    z-index: 999;
  }

  .sticky-top.navbar-dark {
    position: fixed;
    background: #ffffff;
  }

  .navbar-dark .navbar-nav .nav-link::before {
    position: absolute;
    content: "";
    width: 0;
    height: 2px;
    bottom: -1px;
    left: 50%;
    background: var(--primary);
    transition: 0.5s;
  }

  .navbar-dark .navbar-nav .nav-link:hover::before,
  .navbar-dark .navbar-nav .nav-link.active::before {
    width: 100%;
    left: 0;
  }

  .navbar-dark .navbar-nav .nav-link.nav-contact::before {
    display: none;
  }

  .sticky-top.navbar-dark .navbar-brand h1 {
    color: var(--primary);
  }
}

/*** Carousel ***/
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 33, 24, 0.7); /* Updated from rgba(9, 30, 62, 0.7) */
  z-index: 1;
}

@media (max-width: 576px) {
  .carousel-caption h5 {
    font-size: 14px;
    font-weight: 500 !important;
  }

  .carousel-caption h1 {
    font-size: 30px;
    font-weight: 600 !important;
  }
}

.carousel-control-prev,
.carousel-control-next {
  width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3rem;
  height: 3rem;
}

/*** Section Title ***/
.section-title::before {
  position: absolute;
  content: "";
  width: 150px;
  height: 5px;
  left: 0;
  bottom: 0;
  background: var(--primary);
  border-radius: 2px;
}

.section-title.text-center::before {
  left: 50%;
  margin-left: -75px;
}

.section-title.section-title-sm::before {
  width: 90px;
  height: 3px;
}

.section-title::after {
  position: absolute;
  content: "";
  width: 6px;
  height: 5px;
  bottom: 0px;
  background: #ffffff;
  -webkit-animation: section-title-run 5s infinite linear;
  animation: section-title-run 5s infinite linear;
}

.section-title.section-title-sm::after {
  width: 4px;
  height: 3px;
}

.section-title.text-center::after {
  -webkit-animation: section-title-run-center 5s infinite linear;
  animation: section-title-run-center 5s infinite linear;
}

.section-title.section-title-sm::after {
  -webkit-animation: section-title-run-sm 5s infinite linear;
  animation: section-title-run-sm 5s infinite linear;
}

@-webkit-keyframes section-title-run {
  0% {
    left: 0;
  }
  50% {
    left: 145px;
  }
  100% {
    left: 0;
  }
}

@-webkit-keyframes section-title-run-center {
  0% {
    left: 50%;
    margin-left: -75px;
  }
  50% {
    left: 50%;
    margin-left: 45px;
  }
  100% {
    left: 50%;
    margin-left: -75px;
  }
}

@-webkit-keyframes section-title-run-sm {
  0% {
    left: 0;
  }
  50% {
    left: 85px;
  }
  100% {
    left: 0;
  }
}

/*** Service ***/
.service-item {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0 30px 0; /* Remove top padding */
  transition: 0.5s;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Image at the top of service card */
.service-item .service-img-container {
  width: 100%;
  height: 200px; /* Fixed height for image container */
  margin-bottom: 25px;
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.service-item .service-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.service-item .service-content {
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-item .service-icon {
  margin: 0 0 20px 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  transition: 0.3s;
}

.service-item:hover .service-icon {
  background: var(--secondary);
  transform: scale(1.1);
}

.service-item .service-icon i {
  color: white;
  font-size: 24px;
}

.service-item h4 {
  margin-bottom: 15px;
  font-weight: 700;
  transition: 0.3s;
}

.service-item:hover h4 {
  color: var(--primary);
}

.service-item p {
  margin-bottom: 20px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
}

/* Modern card styles */
.bg-light {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-light:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Update button styles */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  border-radius: 30px;
  padding: 10px 25px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 5px 15px rgba(178, 34, 34, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(210, 105, 30, 0.3);
}

/* Add animations for better UX */
.wow {
  visibility: hidden;
}

/* Fix for accordion in FAQs */
.accordion-item {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.accordion-button {
  font-weight: 600;
  padding: 20px;
  background-color: #fff;
  color: var(--dark);
}

.accordion-button:not(.collapsed) {
  background-color: var(--light);
  color: var(--primary);
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.1);
}

.accordion-body {
  padding: 20px;
  background-color: #fff;
}

/* Updated detailed services section */
.detailed-service {
  padding: 25px;
  border-radius: 12px;
  height: 100%;
  transition: all 0.3s ease;
  background: linear-gradient(to bottom, #fff, var(--light));
  border-top: 3px solid var(--primary);
}

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

.detailed-service h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.detailed-service h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary);
}

/* Add modern navbar styling */
.navbar-dark .navbar-nav .nav-link {
  color: #fff;
  font-weight: 600;
  padding: 30px 15px;
  transition: all 0.3s ease;
}

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

.sticky-top.navbar-dark .navbar-nav .nav-link {
  color: var(--dark);
}

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

/* Enhance contact section */
#contact {
  background-color: var(--light);
}

/* Add subtle texture to the background */
body {
  background-color: #f9f9f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23000000' fill-opacity='0.02' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

/* Update footer styling */
.footer {
  background: var(--dark);
  color: #fff;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 45px;
  bottom: 45px;
  z-index: 99;
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

/* Fix other blue backgrounds */
.bg-header {
  background: linear-gradient(rgba(43, 33, 24, 0.7), rgba(43, 33, 24, 0.7)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

/* Fix secondary button color */
.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

/* Ensure all containers with bg-primary use the updated color */
.bg-primary {
  background-color: var(--primary) !important;
}

/* Additional fixes for any potential blue colors */
:root {
  --bs-primary: var(--primary); /* Override Bootstrap's primary color */
  --bs-secondary: var(--secondary); /* Override Bootstrap's secondary color */
}

/* Modernize the service area section */
.service-areas ul {
  list-style: none;
  padding-left: 0;
}

.service-areas ul li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  position: relative;
  padding-left: 25px;
  transition: all 0.3s ease;
}

.service-areas ul li:before {
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--primary);
  transition: all 0.3s ease;
}

.service-areas ul li:hover {
  padding-left: 30px;
  color: var(--primary);
}

.service-areas ul li:hover:before {
  color: var(--secondary);
  left: 5px;
}

/* Fix for service cards row */
.row.g-5 {
  display: flex;
  flex-wrap: wrap;
}

/* Make service cards equal height */
.service-item {
  position: relative;
  height: 100%; /* Changed from auto to 100% */
  display: flex;
  flex-direction: column;
  padding: 30px;
  transition: 0.5s;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-item p {
  flex-grow: 1; /* Allow paragraph to expand to fill space */
  margin-bottom: 20px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.6;
}

/* Fix blue background in carousel caption */
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 33, 24, 0.7); /* Updated from rgba(9, 30, 62, 0.7) */
  z-index: 1;
}

/* Enhance hero section */
.carousel-caption .container {
  max-width: 900px;
}

.carousel-caption h5 {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease forwards;
}

.carousel-caption h1 {
  font-size: 60px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 30px;
  animation: fadeIn 1.5s ease forwards;
}

@media (max-width: 768px) {
  .carousel-caption h5 {
    font-size: 18px;
  }
  .carousel-caption h1 {
    font-size: 30px;
  }
}

/* Fix other blue backgrounds */
.bg-header {
  background: linear-gradient(rgba(43, 33, 24, 0.7), rgba(43, 33, 24, 0.7)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

/* Fix secondary button color */
.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

/* Ensure all containers with bg-primary use the updated color */
.bg-primary {
  background-color: var(--primary) !important;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  border: 2px solid var(--primary);
}

.logo-icon i {
  font-size: 20px;
  color: var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
}

.logo-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--light);
  letter-spacing: 2px;
}

.sticky-top .logo-title {
  color: var(--primary);
}

.sticky-top .logo-subtitle {
  color: var(--dark);
}

@media (max-width: 991.98px) {
  .logo-title {
    color: var(--primary);
  }

  .logo-subtitle {
    color: var(--dark);
  }
}
