/********** Template CSS **********/
:root {
  --primary: #00B87B;
  --secondary: #314355;
  --light: #F2F2F2;
  --dark: #2C3E50;
}

#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 991.98px) {
  .sticky-lg-top.vh-100 {
    height: 100% !important;
  }
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .portfolio {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .portfolio {
        grid-template-columns: 1fr;
    }
}


.fw-semi-bold {
  font-weight: 600;
}

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

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

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

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

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.typed-cursor {
  font-size: 25px;
  color: var(--light);
}

.back-to-top {
  position: fixed;
  display: none;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 1;
  font-size: 30px;
  right: 30px;
  bottom: 30px;
  transition: background 0.5s;
  z-index: 11;
}

.back-to-top i {
  color: var(--primary);
}

.back-to-top i:hover {
  color: var(--dark);
}

.back-to-top {
  -webkit-animation: action 1s infinite alternate;
  animation: action 1s infinite alternate;
}

@-webkit-keyframes action {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-15px);
  }
}

@keyframes action {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-15px);
  }
}

.title {
  position: relative;
}

.title::before {
  position: absolute;
  content: "";
  width: 10px;
  height: 10px;
  bottom: -4px;
  left: 0;
  border: 2px solid var(--light);
  border-radius: 10px;
}

.title::after {
  position: absolute;
  content: "";
  width: 50px;
  height: 2px;
  bottom: 0;
  left: 15px;
  border-radius: 2px;
  background: var(--light);
}

.progress {
  height: 5px;
}

.progress .progress-bar {
  width: 0px;
  transition: 2s;
}

.service-item {
  padding: 30px;
  text-align: center;
  background: var(--secondary);
}

.service-item i {
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  color: var(--primary);
  transition: .5s;
}

.service-item:hover i {
  background: var(--primary);
  color: var(--light);
}

.portfolio-container{
  display: flex;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.portfolio-item > div {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin-bottom: 0 !important;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-item .portfolio-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item .portfolio-btn a {
  display: inline-block;
  padding: 12px 32px;
  background: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--light);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid rgba(0, 184, 123, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.portfolio-item .portfolio-btn a:hover {
  background: rgba(0, 184, 123, 0.9);
  border-color: var(--primary);
  color: var(--light);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 184, 123, 0.4);
}

.portfolio-item .portfolio-btn p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--light);
}

.column{
  float: left;
  width: 33.3%;
  padding: 10px;
}

.row1:after {
  content: "";
  display: table;
  clear: both;
}

.portfolio-item:hover .portfolio-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.portfolio-item img {
  transition: transform 0.4s ease, filter 0.4s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.portfolio-item i {
  opacity: 0;
  transition: .3s;
  transition-delay: .3s;
}

.portfolio-item:hover i {
  opacity: 1;
}

/* Responsive improvements for modal */
@media (max-width: 768px) {
  .portfolio-item .portfolio-btn {
    border-radius: 8px;
  }
  
  .portfolio-item:hover .portfolio-btn {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    max-width: 95%;
    max-height: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .portfolio-item .portfolio-btn a {
    padding: 12px;
  }
  
  .portfolio-item .portfolio-btn p {
    font-size: 13px;
  }
  
  .portfolio-item .portfolio-btn a::after {
    font-size: 16px;
    margin-top: 6px;
  }
}

@media (max-width: 576px) {
  .portfolio-item .portfolio-btn p {
    font-size: 12px;
  }
  
  .portfolio-item .portfolio-btn a {
    padding: 10px;
  }
  
  .portfolio-item:hover .portfolio-btn {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    max-width: 95%;
    max-height: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .portfolio-item .portfolio-btn a::after {
    font-size: 14px;
    margin-top: 4px;
  }
}

.testimonial-carousel .owl-dots {
  margin-top: 25px;
  text-align: center;
}

.testimonial-carousel .owl-dot {
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  background: var(--light);
}

.testimonial-carousel .owl-dot.active {
  background: var(--primary);
}