.hero {
  position: relative;
  margin-top: 5rem;
  min-height: clamp(28rem, 70vh, 48rem);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero > .row {
  width: 100%;
  --bs-gutter-y: 0;
}

.hero > *:not(.hero-backdrop) {
  position: relative;
  z-index: 1;
}

.hero-backdrop {
  position: absolute;
  top: 0.5rem;
  bottom: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  border-top: 1px solid #90a4ae;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(255,255,255,1) 0,
      rgba(255,255,255,0.88) 2%,
      rgba(255,255,255,0.56) 4%,
      rgba(255,255,255,0.18) 7%,
      rgba(255,255,255,0) 9%,
      rgba(255,255,255,0) 91%,
      rgba(255,255,255,0.18) 93%,
      rgba(255,255,255,0.56) 96%,
      rgba(255,255,255,0.88) 98%,
      rgba(255,255,255,1) 100%),
    linear-gradient(to bottom,
      rgba(255,255,255,0) 0,
      rgba(255,255,255,0) 62%,
      rgba(255,255,255,0.12) 72%,
      rgba(255,255,255,0.34) 82%,
      rgba(255,255,255,0.66) 91%,
      rgba(255,255,255,1) 100%);
}

.hero-backdrop-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
  opacity: 0.9;
}

.hero-copy-col {
  margin-top: 0 !important;
  background: rgba(255,255,255,0.92);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  max-width: 775px;
}

@media (min-width: 768px) {
  .hero-copy-col {
    padding: 2rem;
  }
}

h1 {
  font-size:3.3rem;
}


/* Tool cards with left thumbnail */
.tool-card{
  border: 1px solid #e6e6e6;
  border-radius: .75rem;
  overflow: hidden;
  transition: transform .06s ease-in-out, box-shadow .06s ease-in-out;
}

.tool-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-thumb-link {
  display: block;
  text-decoration: none;
}

.tool-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #e5e7eb;
  border-bottom: 1px solid #d1d5db;
  padding: 0.75rem;
}
.tool-thumb-placeholder-label {
  display: block;
  width: 100%;
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

/* Footer pins to bottom so buttons align across cards */
.tool-card-footer {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Open button: larger text and consistent width */
.btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
}

.tool-card-footer .btn {
  width: 100%;
}

/* "In development" badge */
.badge-dev {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #ced4da;
  font-weight: 600;
}

/* Disabled card styling */
.tool-card--disabled {
  opacity: 0.62;
}

.tool-card--disabled .tool-thumb-link {
  pointer-events: none;
  cursor: default;
}

/* Disabled button styling */
.btn-disabled {
  background: #adb5bd;
  border-color: #adb5bd;
  color: #ffffff;
  pointer-events: none;
  cursor: not-allowed;
}

/* Add a subtle overlay to disabled thumbnails */
.tool-card--disabled .tool-thumb-top {
  filter: grayscale(100%);
}

.thumb-col{
  width: 140px;
  background: #f6f7f8;
  border-right: 1px solid #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-thumb-top {
  display: block;
  width: 100%;
  height: auto;
  background: #f6f7f8;
  border-bottom: 1px solid #ececec;
  aspect-ratio: 16 / 9;
}

.tool-thumb-link .tool-thumb-placeholder.tool-thumb-top {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tighten on small screens so text gets room */
@media (max-width: 575.98px){
  .thumb-col{ width: 120px; }
}

/* Headings and body spacing */
.card-title{
  letter-spacing: .2px;
}

.tool-card-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-card-title .badge {
  flex: 0 0 auto;
  font-size: 14px;
}

.tool-card-title > span:first-child {
  min-width: 0;
}
.card-text{
  color: #444;
}

/* Make Explore section breathe a bit */
#explore .row{ --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; }

.tools-header {
  display: block;
}

.tools-header::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 0.45rem;
  background: linear-gradient(
    90deg,
    #4b5563 0%,
    #4b5563 58%,
    rgba(75, 85, 99, 0.45) 82%,
    rgba(75, 85, 99, 0) 100%
  );
}

/* If any old left/right structure remains in templates, neutralize it */
.tool-card .thumb-col { display: none !important; }

/* Keep your existing card-body layout & full-width button behavior */
.tool-card .card-body { display: flex; flex-direction: column; height: 100%; }
.tool-card .open-btn { margin-top: auto; }
.tool-card .open-btn .btn { width: 100%; }

/* Smooth anchor scrolling */
html {
  scroll-behavior: smooth;
}

/* Ensure anchored sections don't get hidden behind any fixed header */
section[id] {
  scroll-margin-top: 80px;
}

.section-separator {
  margin: 0;
  border: 0;
  border-top: 1px solid #d6dbe1;
  opacity: 1;
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}

.partners-logo {
  display: block;
  max-height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 767.98px) {
  .partners-logos {
    gap: 1.5rem 2rem;
  }

  .partners-logo {
    max-height: 52px;
  }
}
