html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Sticky footer: body is a flex column; footer is pushed to the bottom.
   html gets the same dark background so any overflow past the footer is dark. */
html {
  min-height: 100vh;
  background-color: #000910;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--background-color, #ffffff);
}

main.main {
  flex: 1 0 auto;
}

footer.footer {
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: 0 !important;
  padding-bottom: 0;
  background-color: #000910;
}

/* Services cards: icon-only fallback when no image is uploaded */
.services .service-item.no-img {
  height: 100%;
  background: var(--surface-color, #ffffff);
  border-radius: 8px;
  box-shadow: 0px 0 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.services .service-item.no-img:hover {
  transform: translateY(-5px);
  box-shadow: 0px 0 35px rgba(0, 0, 0, 0.12);
}

/* Reset the template's negative-margin details block so the icon + text don't collide */
.services .service-item.no-img .details {
  margin: 0 !important;
  padding: 90px 25px 35px 25px !important;
  background: transparent;
  box-shadow: none;
  text-align: center;
  min-height: 160px;
  position: relative;
}

.services .service-item.no-img .details .icon {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 20px 0;
  width: 72px;
  height: 72px;
  background: var(--accent-color, #06b6d4);
  color: var(--contrast-color, #ffffff);
  border: 6px solid var(--surface-color, #ffffff);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: ease-in-out 0.3s;
}

.services .service-item.no-img:hover .details .icon {
  background: var(--surface-color, #ffffff);
  border: 2px solid var(--accent-color, #06b6d4);
  color: var(--accent-color, #06b6d4);
}

.services .service-item.no-img .details h3 {
  font-weight: 700;
  margin: 10px 0 15px 0;
  font-size: 22px;
  position: relative;
  z-index: 2;
  line-height: 1.3;
}

.services .service-item.no-img .details p {
  color: color-mix(in srgb, var(--default-color, #273d4e), transparent 10%);
  line-height: 24px;
  font-size: 14px;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.services .service-item.no-img .img {
  display: none;
}

/* Remove the overlapping tagline text (if present) and ensure clean stacking */
.services .service-item.no-img .details a.stretched-link {
  position: static;
  z-index: 3;
}

.services .service-item.no-img .details a.stretched-link::after {
  content: none;
}

/* Ensure cards don't overlap the section title or each other on narrow screens */
.services .service-item.no-img .details {
  position: relative;
}

/* Neutralize template's hover lift so cards don't overlap adjacent rows */
.services .service-item.no-img:hover {
  transform: none;
}

/* Stronger spacing: rows already have gy-5, but add safe vertical margin between cards */
.services .row.gy-5 > [class*="col-"] {
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .services .row.gy-5 > [class*="col-"] {
    margin-bottom: 2.5rem;
  }
}

/* When an image-less card has a real image it should not get the no-img overrides */
.services .service-item:not(.no-img) .details {
  margin: -100px 30px 0 30px;
}

/* Force a clear row break after every 3 columns on large screens so hover/negative
   margins from the template can never pull cards from the next row upward. */
@media (min-width: 1200px) {
  .services .row.gy-5 > [class*="col-xl-4"]:nth-child(3n+1) {
    clear: left;
  }
}

/* Hide section title if all services are empty / placeholder */
.services.section .section-title p.text-muted.fst-italic {
  display: none;
}
