/********** Hidrofer Poços Artesianos **********/
:root {
  --primary: #3584be;
  --primary-strong: #1e6da1;
  --primary-darker: #175b87;
  --light: #f6f7f8;
  --dark: #1a2a36;
  --footer-text: #c7d2d9;
  --border-soft: #e3e8ec;
  --shadow-soft: 0 0 45px rgba(26, 42, 54, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  text-wrap: pretty;
  color: var(--dark);
}

a {
  color: var(--primary-strong);
}

a:hover,
a:focus {
  color: var(--primary-darker);
}

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

.btn-link:hover,
.btn-link:focus {
  color: var(--primary-darker);
}

#conteudo {
  scroll-margin-top: 84px;
}

img {
  height: auto;
}

::selection {
  background: var(--primary-strong);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--primary-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100000;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

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

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

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

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

.whats {
  position: fixed;
  display: flex;
  right: 40px;
  bottom: 20px;
  z-index: 99;
}

/*** 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,
.btn.btn-outline-primary:hover {
  color: #ffffff;
}

.btn-primary {
  --bs-btn-bg: var(--primary-strong);
  --bs-btn-border-color: var(--primary-strong);
  --bs-btn-hover-bg: var(--primary-darker);
  --bs-btn-hover-border-color: var(--primary-darker);
  --bs-btn-active-bg: var(--primary-darker);
  --bs-btn-active-border-color: var(--primary-darker);
  background-color: var(--primary-strong);
  border-color: var(--primary-strong);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-darker);
  border-color: var(--primary-darker);
  color: #ffffff;
}

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

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

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

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

.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: 0;
  transition: box-shadow 0.5s ease-out;
}

.navbar .navbar-brand,
.navbar a.btn {
  height: 75px;
}

.navbar .navbar-nav .nav-link {
  margin-right: 30px;
  padding: 25px 0;
  color: var(--dark);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  outline: none;
}

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

.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: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .navbar .navbar-nav {
    border-top: 1px solid var(--border-soft);
  }
}

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

/*** Header ***/
.display-1,
.display-2,
.display-3 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

.display-2 {
  font-size: clamp(2rem, 1.2rem + 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.owl-carousel-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.1);
}

@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 p {
    font-size: 16px !important;
  }
}

.header-carousel .owl-dots {
  position: absolute;
  width: 60px;
  height: 100%;
  top: 0;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
  position: relative;
  width: 45px;
  height: 45px;
  margin: 5px 0;
  background: #ffffff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
  border-radius: 45px;
  transition: 0.5s;
}

.header-carousel .owl-dots .owl-dot.active {
  width: 60px;
  height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 2px;
  border-radius: 45px;
  transition: 0.5s;
}

@media (max-width: 768px) {
  .header-carousel .owl-dots {
    width: 100%;
    height: auto;
    top: auto;
    bottom: 12px;
    right: 0;
    left: 0;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
  }

  .header-carousel .owl-dots .owl-dot {
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .header-carousel .owl-dots .owl-dot.active {
    width: 52px;
    height: 52px;
  }
}

.page-header {
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
    url(../img/hidrofer-logo-azul.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);
  }
}

/*** Service ***/
.service-item {
  box-shadow: var(--shadow-soft);
  border-radius: 12px;
}

.service-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.service-card-title {
  margin-top: 16px;
}

/*** Topbar desktop: texto claro sobre fundo escuro + links reais ***/
.container-fluid.bg-dark small {
  color: #ffffff;
}

.container-fluid.bg-dark .text-primary {
  color: var(--primary) !important;
}

.topbar-desktop a {
  color: #ffffff;
  text-decoration: none;
}

.topbar-desktop a:hover,
.topbar-desktop a:focus {
  color: var(--footer-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.container-fluid.bg-dark .btn-link {
  color: var(--footer-text);
}

.container-fluid.bg-dark .btn-link:hover,
.container-fluid.bg-dark .btn-link:focus {
  color: #ffffff;
}

/*** Topbar mobile ***/
.topbar-mobile {
  background: var(--dark);
}

.topbar-mobile a {
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-mobile a:hover,
.topbar-mobile a:focus {
  color: var(--footer-text);
}

/*** Floating actions ***/
.fab-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/*** Footer ***/
.footer {
  color: var(--footer-text);
}

.footer p {
  color: var(--footer-text);
}

.footer .btn.btn-social {
  margin-right: 5px;
  min-width: 44px;
  min-height: 44px;
  color: var(--footer-text);
  border: 1px solid var(--footer-text);
  border-radius: 38px;
  transition: 0.3s;
}

.footer .btn.btn-social:hover,
.footer .btn.btn-social:focus {
  color: #fff;
  border-color: #fff;
  background: var(--primary-strong);
}

.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 6px 0;
  min-height: 44px;
  text-align: left;
  color: var(--footer-text);
  font-weight: normal;
  text-transform: capitalize;
  transition: 0.3s;
  text-decoration: none;
}

.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: #ffffff;
  letter-spacing: 0;
  box-shadow: none;
}

.footer .row.g-2 img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

.footer .copyright {
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer .copyright a {
  color: #fff;
}

.footer .copyright a:hover {
  color: #fff;
  text-decoration: underline;
}

/*** Reduced motion: alternativa intencional que preserva estado ***/
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .wow,
  .animated,
  .slideInDown,
  .slideInLeft,
  .fadeIn,
  .fadeInUp {
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .back-to-top {
    transition: none;
  }

  .header-carousel .owl-dots .owl-dot,
  .btn,
  .footer .btn.btn-link {
    transition: none;
  }
}
