/********** Style CSS **********/
:root {
  --primary: #009cff;
  --secondary: #777777;
  --light: #f8f8f8;
  --dark: #252525;
}

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

/* CPA stacked brand */
.cpa-brand {
  gap: 0.85rem;
  text-decoration: none;
  min-width: 0;
}

.cpa-brand-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 10px;
  font-size: 1.35rem;
}

.cpa-brand-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1;
}

.cpa-brand-main {
  color: var(--primary);
  font-family: var(--heading-font, inherit);
  font-size: clamp(1.45rem, 2.2vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.cpa-brand-sub {
  margin-top: 0.32rem;
  color: #435167;
  font-size: clamp(0.68rem, 1vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Mobile CPA brand */
@media (max-width: 991.98px) {
  .cpa-brand {
    gap: 0.65rem;
    max-width: calc(100% - 110px);
  }

  .cpa-brand-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 1.1rem;
    border-radius: 9px;
  }

  .cpa-brand-main {
    font-size: 1.45rem;
  }

  .cpa-brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
  }
}

@media (max-width: 420px) {
  .cpa-brand-main {
    font-size: 1.25rem;
  }

  .cpa-brand-sub {
    font-size: 0.56rem;
    letter-spacing: 0.2em;
  }
}

/*** 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 .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
  margin-right: 30px;
  padding: 20px 0;
  color: #ffffff;
  font-weight: 500;
  outline: none;
}

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

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

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

  .navbar .navbar-nav {
    margin-top: 8px;
    border-top: 1px solid rgba(256, 256, 256, 0.1);
  }
}

@media (min-width: 992px) {
  .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;
  }
}

/*** Header ***/
#header-carousel .carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

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

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

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

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

#header-carousel .carousel-indicators [data-bs-target] {
  width: 60px;
  height: 60px;
  text-indent: 0;
  margin-bottom: 15px;
  border: 2px solid #ffffff;
  border-radius: 60px;
  overflow: hidden;
}

#header-carousel .carousel-indicators [data-bs-target] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

/*** Section Title ***/
.section-title {
  position: relative;
  display: inline-block;
  text-transform: uppercase;
}

.section-title::before {
  position: absolute;
  content: "";
  width: calc(100% + 80px);
  height: 2px;
  top: 4px;
  left: -40px;
  background: var(--primary);
  z-index: -1;
}

.section-title::after {
  position: absolute;
  content: "";
  width: calc(100% + 120px);
  height: 2px;
  bottom: 4px;
  left: -60px;
  background: var(--primary);
  z-index: -1;
}

.section-title.text-start::before {
  width: calc(100% + 40px);
  left: 0;
}

.section-title.text-start::after {
  width: calc(100% + 60px);
  left: 0;
}

/*** Img Border ***/
.img-border {
  position: relative;
  height: 100%;
  min-height: 400px;
}

.img-border::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  right: 3rem;
  bottom: 3rem;
  border: 5px solid var(--primary);
  border-radius: 6px;
}

.img-border img {
  position: absolute;
  top: 3rem;
  left: 3rem;
  width: calc(100% - 3rem);
  height: calc(100% - 3rem);
  object-fit: cover;
  border-radius: 6px;
}

/*** Facts ***/
.fact-item {
  transition: 0.5s;
}

.fact-item:hover {
  margin-top: -10px;
  background: #ffffff !important;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.07);
}

/*** Service ***/
.service-item {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.07);
  border: 1px solid transparent;
  transition: 0.5s;
}

.service-item:hover {
  margin-top: -10px;
  box-shadow: none;
  border: 1px solid #dee2e6;
}

/*** Feature ***/
.progress {
  height: 5px;
}

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

/*** Project ***/
.project-item a {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  opacity: 0;
  transition: 0.5s;
}

.project-item:hover a {
  opacity: 1;
}

.project-carousel .owl-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-carousel .owl-dot {
  width: 35px;
  height: 35px;
  margin: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  border-radius: 35px;
  transition: 0.5s;
}

.project-carousel .owl-dot:hover,
.project-carousel .owl-dot.active {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

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

.team-item .team-text {
  position: relative;
  min-height: 95px;
  height: auto;
  overflow: visible;
}

.team-item .team-title {
  position: static;
  width: 100%;
  min-height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
}

.team-item .team-title h5 {
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.team-item .team-title span {
  display: block;
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.5;
  color: var(--secondary);
}

.team-item .team-social {
  display: none;
}

.team-item .team-social .btn {
  margin: 0 3px;
}

@media (max-width: 767.98px) {
  .team-item .team-text,
  .team-item .team-title {
    min-height: auto;
  }

  .team-item .team-title h5 {
    font-size: 1.1rem;
  }

  .team-item .team-title span {
    font-size: 0.95rem;
  }
}

/*** Testimonial ***/

.testimonial-carousel .owl-item .testimonial-item img {
  width: 60px;
  height: 60px;
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item .testimonial-item * {
  transition: 0.5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
  background: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
  color: #ffffff !important;
}

.testimonial-carousel .owl-nav {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
  margin: 0 12px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
  border-radius: 50px;
  font-size: 18px;
  transition: 0.5s;
}

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

/*** 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;
  color: var(--secondary);
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  color: var(--primary);
  letter-spacing: 1px;
  box-shadow: none;
}

.footer .copyright {
  padding: 25px 0;
  font-size: 15px;
  border-top: 1px solid rgba(256, 256, 256, 0.1);
}

.footer .copyright a {
  color: var(--light);
}

.footer .copyright a:hover {
  color: var(--primary);
}

/********** Portfolio Demo Polish Overrides **********/
:root {
  --primary: #008fe8;
  --secondary: #667085;
  --light: #f6f9fc;
  --dark: #1f2937;
}

body {
  color: #5f6673;
  line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0.01em;
}

/* Top identity row */
.top-bar h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.top-bar h6 {
  font-size: 0.95rem;
}

/* Make the nav feel less template-heavy */
.navbar.bg-primary {
  box-shadow: 0 12px 28px rgba(0, 156, 255, 0.18);
}

.navbar .navbar-nav .nav-link {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: #102033;
}

/* Hero readability and conversion */
#header-carousel .carousel-caption {
  background: rgba(0, 0, 0, 0.58);
}

#header-carousel .carousel-caption h4 {
  letter-spacing: 0.08em;
  font-size: 1rem;
}

#header-carousel .carousel-caption h1 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.15;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.hero-actions .btn {
  min-width: 190px;
  font-weight: 700;
}

#header-carousel .carousel-indicators {
  display: none;
}

/* Card polish */
.fact-item,
.service-item,
.project-item,
.team-item,
.testimonial-item {
  border: 1px solid #eef1f4;
  box-shadow: 0 18px 45px rgba(31, 41, 55, 0.07);
}

.fact-item:hover,
.service-item:hover {
  transform: translateY(-8px);
  margin-top: 0;
}

.service-item img,
.project-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.img-border {
  min-height: 430px;
}

/* The percentage bars felt like arbitrary proof, so make them more like service focus indicators. */
.skill .progress {
  background: #e8eef5;
}

/* Footer/contact */
.footer .form-control::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.footer .btn.btn-link:hover {
  color: var(--primary);
}

@media (max-width: 991.98px) {
  .container-fluid.py-4.px-5 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  #header-carousel .carousel-item img {
    height: 620px;
  }

  .hero-actions {
    display: grid;
    gap: 0.85rem;
    justify-content: center;
  }

  .hero-actions .btn {
    margin-right: 0 !important;
  }

  .img-border {
    min-height: 360px;
  }
}

@media (max-width: 575.98px) {
  #header-carousel .carousel-item img {
    height: 560px;
  }

  #header-carousel .carousel-caption h1 {
    font-size: clamp(2.1rem, 12vw, 3rem);
  }

  #header-carousel .carousel-caption h4 {
    font-size: 0.9rem;
  }
}

/* Hide scroll-to-top button for portfolio demo review */
.back-to-top {
  display: none !important;
}

/* Final fixed CPA navbar override */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  padding-top: 72px !important;
}

.cpa-navbar,
.navbar.cpa-navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-height: 72px;
  z-index: 99999 !important;

  transform: none !important;
  transition: none !important;
  animation: none !important;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Prevent old Bootstrap/template sticky behavior from affecting this navbar */
.cpa-navbar.sticky-top,
.navbar.cpa-navbar.sticky-top {
  position: fixed !important;
  top: 0 !important;
}

/* Prevent JS inline styles from visually hiding the navbar */
.cpa-navbar[style],
.navbar.cpa-navbar[style] {
  top: 0 !important;
  transform: none !important;
}

@media (max-width: 991.98px) {
  body {
    padding-top: 72px !important;
  }

  .cpa-navbar,
  .navbar.cpa-navbar {
    min-height: 72px;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .cpa-navbar .navbar-brand {
    font-size: 1.25rem;
  }

  .cpa-navbar .navbar-toggler {
    width: 52px;
    height: 52px;
    padding: 0 !important;
    margin-right: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cpa-navbar .navbar-collapse {
    background: var(--primary);
    padding: 1rem;
    margin-top: 0.75rem;
    border-radius: 0 0 12px 12px;
  }

  .cpa-navbar .navbar-collapse.collapse:not(.show) {
    display: none !important;
  }

  .cpa-navbar .navbar-collapse.collapse.show {
    display: block !important;
  }

  .cpa-navbar .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }
}
