/* Professional homepage hero slider — visual refinement only. */
.slider-area {
  position: relative;
  background: #111;
  overflow: hidden;
}

.preview-2 .nivoSlider {
  position: relative;
  width: 100% !important;
  height: clamp(520px, 52vw, 720px) !important;
  min-height: 520px;
  overflow: hidden;
}

.preview-2 .nivoSlider .nivo-main-image,
.preview-2 .nivoSlider img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
}

.preview-2 .nivoSlider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.32) 42%, rgba(0,0,0,.12) 100%),
    linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.06) 50%, rgba(0,0,0,.48) 100%);
}

.slider-direction {
  z-index: 10;
  height: 100%;
}

.slider-content {
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  text-align: right;
}

.slider-two .slider-content.text-center,
.slider-two .slider-content {
  text-align: center;
}

.hero-copy {
  width: min(760px, 92%);
  padding: 34px 38px 38px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(10,22,16,.76), rgba(10,22,16,.38));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  background: #3EC1D5;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  border: 1px solid rgba(62,193,213,.60);
  border-radius: 999px;
  color: #e9fbff;
  background: rgba(62,193,213,.16);
  font-size: 15px;
  font-weight: 600;
}

.layer-1-1 h2.title1,
.layer-1-2 h1.title2,
.layer-1-2 h2.title2 {
  margin: 0;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0,0,0,.35);
}

.layer-1-1 h2.title1 {
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.35;
  font-weight: 700;
}

.layer-1-2 {
  margin: 12px 0 0;
}

.layer-1-2 h1.title2,
.layer-1-2 h2.title2 {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.25;
  font-weight: 800;
}

.hero-description {
  max-width: 680px;
  margin: 16px auto 0;
  color: rgba(255,255,255,.91);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.slider-one .hero-description {
  margin-right: 0;
  margin-left: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.slider-two .hero-actions {
  justify-content: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 145px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.hero-btn:hover,
.hero-btn:focus {
  transform: translateY(-2px);
  text-decoration: none !important;
}

.hero-btn-primary {
  color: #fff !important;
  background: #3EC1D5;
  box-shadow: 0 9px 24px rgba(62,193,213,.28);
}

.hero-btn-primary:hover,
.hero-btn-primary:focus {
  background: #2fa7b9;
  box-shadow: 0 12px 28px rgba(62,193,213,.38);
}

.hero-btn-outline {
  color: #fff !important;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.72);
}

.hero-btn-outline:hover,
.hero-btn-outline:focus {
  background: rgba(255,255,255,.18);
}

.preview-2 .nivo-directionNav a {
  z-index: 20;
  width: 54px;
  height: 54px;
  line-height: 50px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(0,0,0,.16);
  transition: all .25s ease;
}

.preview-2 .nivo-directionNav a:hover {
  background: rgba(62,193,213,.90);
  border-color: rgba(255,255,255,.95);
}

.preview-2 .nivo-controlNav {
  z-index: 25;
  bottom: 22px;
  top: auto;
  width: 100%;
  text-align: center;
}

.preview-2 .nivo-controlNav a {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 2px 7px rgba(0,0,0,.2);
}

.preview-2 .nivo-controlNav a.active {
  width: 28px;
  border-radius: 999px;
  background: #3EC1D5;
  border-color: #3EC1D5;
}

@media (max-width: 991px) {
  .preview-2 .nivoSlider {
    height: clamp(500px, 72vw, 650px) !important;
    min-height: 500px;
  }
  .hero-copy {
    width: min(700px, 94%);
    padding: 28px 28px 30px;
  }
}

@media (max-width: 767px) {
  .preview-2 .nivoSlider {
    height: 570px !important;
    min-height: 570px;
  }
  .slider-content {
    padding: 0 14px;
    justify-content: center;
  }
  .hero-copy {
    width: 94%;
    padding: 25px 20px 27px;
    border-radius: 18px;
  }
  .hero-kicker {
    font-size: 13px;
    margin-bottom: 9px;
  }
  .layer-1-1 h2.title1 {
    font-size: 24px !important;
    line-height: 1.4 !important;
  }
  .layer-1-2 h1.title2,
  .layer-1-2 h2.title2 {
    font-size: 28px !important;
    line-height: 1.4 !important;
  }
  .hero-description {
    font-size: 15px;
    line-height: 1.75;
  }
  .hero-actions {
    justify-content: center;
    gap: 9px;
    margin-top: 19px;
  }
  .hero-btn {
    min-width: 132px;
    padding: 10px 15px;
    font-size: 14px;
  }
  .preview-2 .nivo-directionNav a {
    width: 44px;
    height: 44px;
    line-height: 40px;
  }
  .preview-2 .nivo-controlNav {
    bottom: 14px;
  }
}

/* ===== Final mobile layout fix ===== */
@media (max-width: 767px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .header-area,
  .header-area.stick {
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    padding: 0 !important;
  }

  .header-area .container,
  .slider-area .container,
  .slider-direction .container,
  .slider-direction .row,
  .slider-direction [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header-area .container,
  .slider-direction .container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .navbar {
    min-height: 60px !important;
  }

  .navbar-header {
    width: 100% !important;
  }

  .navbar-brand,
  .navbar-default .navbar-brand,
  .stick .navbar-header a.navbar-brand {
    max-width: calc(100% - 75px) !important;
    height: 60px !important;
    line-height: 42px !important;
    padding: 8px 12px !important;
    font-size: 18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .navbar-default .navbar-toggle,
  .stick .navbar-default .navbar-toggle {
    display: block !important;
    margin: 0 12px 0 0 !important;
    padding: 18px 8px !important;
    height: 60px !important;
  }

  .main-menu .navbar-collapse {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    z-index: 99999;
    background: #111 !important;
  }

  .main-menu ul.navbar-nav,
  .nav.navbar-nav.navbar-right,
  .stick .nav.navbar-nav.navbar-right {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #111 !important;
  }

  .main-menu ul.navbar-nav li,
  .stick .main-menu ul.navbar-nav li {
    width: 100% !important;
    text-align: right !important;
  }

  .main-menu ul.navbar-nav li a,
  .stick .main-menu ul.navbar-nav li a {
    display: block !important;
    width: 100% !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .slider-area {
    width: 100% !important;
    margin-top: 60px !important;
    overflow: hidden !important;
  }

  .preview-2 .nivoSlider {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 500px !important;
    min-height: 500px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .preview-2 .nivoSlider .nivo-main-image,
  .preview-2 .nivoSlider img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  .slider-direction {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .slider-content {
    width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    padding: 20px 14px 42px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .hero-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px 18px 22px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .hero-kicker {
    font-size: 12px !important;
    line-height: 1.5 !important;
    padding: 6px 10px !important;
    margin-bottom: 8px !important;
  }

  .layer-1-1 h2.title1,
  .layer-1-2 h1.title2,
  .layer-1-2 h2.title2 {
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    text-align: center !important;
  }

  .layer-1-1 h2.title1 {
    font-size: 22px !important;
    line-height: 1.35 !important;
  }

  .layer-1-2 h1.title2,
  .layer-1-2 h2.title2 {
    font-size: 25px !important;
    line-height: 1.4 !important;
  }

  .hero-description {
    max-width: 100% !important;
    margin: 12px auto 0 !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    text-align: center !important;
  }

  .hero-actions {
    width: 100% !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 15px !important;
  }

  .hero-btn {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    max-width: 190px !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
  }

  .preview-2 .nivo-directionNav a {
    display: none !important;
  }

  .preview-2 .nivo-controlNav {
    bottom: 10px !important;
  }

  .btn-floating {
    right: 10px !important;
    width: 46px !important;
    height: 46px !important;
  }
}

/* Final mobile readability fix: About/service text only */
@media (max-width: 767px) {
  #about .well-middle,
  #about .well-middle p,
  #about .well-middle li,
  #about .well-middle li strong,
  #about .well-middle li i,
  #about .well-middle li::marker {
    color: #26363c !important;
    -webkit-text-fill-color: #26363c !important;
    opacity: 1 !important;
  }
  #about .well-middle li i {
    color: #1fa9bc !important;
    -webkit-text-fill-color: #1fa9bc !important;
  }
}

/* ===== Mobile final correction: hero viewport + about text ===== */
@media (max-width: 767px) {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    background: #fff !important;
  }

  /* Keep the hero exactly inside the mobile viewport. */
  .slider-area,
  .niceties.preview-2,
  #ensign-nivoslider,
  .preview-2 .nivoSlider,
  .preview-2 .nivo-caption {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .slider-area {
    margin-top: 60px !important;
    background: transparent !important;
  }

  .niceties.preview-2 {
    position: relative !important;
    height: 500px !important;
    min-height: 500px !important;
  }

  #ensign-nivoslider {
    height: 500px !important;
    min-height: 500px !important;
    padding: 0 !important;
  }

  .preview-2 .nivoSlider {
    height: 500px !important;
    min-height: 500px !important;
    padding: 0 !important;
  }

  .preview-2 .nivoSlider .nivo-main-image,
  .preview-2 .nivoSlider img,
  #ensign-nivoslider > img {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
  }

  .preview-2 .nivo-caption {
    top: 0 !important;
    bottom: auto !important;
    height: 500px !important;
    padding: 0 !important;
    opacity: 1 !important;
  }

  .nivo-caption .slider-direction {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .nivo-caption .slider-direction .container,
  .nivo-caption .slider-direction .row,
  .nivo-caption .slider-direction [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .nivo-caption .slider-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px !important;
    padding: 18px 14px 38px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .nivo-caption .hero-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* About/services section: readable dark text on the light background. */
  #about,
  #about.area-padding {
    background: #f9f9f9 !important;
    color: #33464d !important;
    overflow: hidden !important;
  }

  #about .container,
  #about .row,
  #about [class*="col-"] {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #about .section-headline h2 {
    color: #26363c !important;
    -webkit-text-fill-color: #26363c !important;
  }

  #about .section-subheading,
  #about .section-subheading strong,
  #about .well-middle,
  #about .well-middle p,
  #about .well-middle li,
  #about .well-middle li strong {
    color: #33464d !important;
    -webkit-text-fill-color: #33464d !important;
    opacity: 1 !important;
  }

  #about .well-middle p,
  #about .well-middle li {
    font-size: 15px !important;
    line-height: 1.9 !important;
  }

  #about .well-middle li {
    display: list-item !important;
    margin: 0 !important;
    padding: 5px 0 !important;
  }

  #about .well-middle li i {
    color: #1fa9bc !important;
    -webkit-text-fill-color: #1fa9bc !important;
  }

  #about .contact-link {
    color: #168ca0 !important;
    -webkit-text-fill-color: #168ca0 !important;
  }
}
