/* expertise page ====================================*/
#expertise .pageheader {
  background-image: url(../img/expertise.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  padding: 190px 0 35px 0;
}

#expertise .pageheader .title {
  color: #fff;
  border: none;
}

/* DIV Triangles =================================*/

/* Mid-page triangle — bridges color-2 (#expert) into color-1 (#platforms) */
#expert:after {
  top: auto;
  border: solid transparent;
  border-color: var(--bg-color-1);
  border-top-color: var(--bg-color-2);
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-width: 30px;
  left: 50%;
  margin-left: -30px;
  z-index: 1;
}

/* Bottom triangle — bridges color-1 (#platforms) into page background */
#platforms:after {
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border: solid transparent;
  border-color: var(--bg-page);
  border-top-color: var(--bg-color-1);
  border-width: 30px;
  left: 50%;
  margin-left: -30px;
  top: auto;
  margin-top: 40px;
  z-index: 1;
}

/* ===========================
   Filters (kept + tidy)
=========================== */

.categories {
  padding-bottom: 30px;
  text-align: center;
}

ul.cat,
ol.type {
  padding-left: 0;
  margin: 0;
}

ul.cat li,
ol.type li {
  display: inline-block;
}

ol.type li a {
  color: #777;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s ease;
}

ol.type li a.active {
  color: #f6f6f6;
  border: 1px solid var(--accent);
  background-color: var(--accent);
}

ol.type li a:hover {
  color: #f6f6f6;
  border: 1px solid var(--accent);
}

/* ===========================
   Isotope (UNCHANGED - critical)
=========================== */

.isotope-item {
  z-index: 2;
}

.isotope-hidden.isotope-item {
  z-index: 1;
}

.isotope,
.isotope .isotope-item {
  transition-duration: 0.8s;
}

.isotope-item {
  margin-right: -1px;
  backface-visibility: hidden;
}

.isotope {
  backface-visibility: hidden;
  transition-property: height, width;
}

.isotope .isotope-item {
  backface-visibility: hidden;
  transition-property: transform, opacity;
}

/* =========================================
   Trusted Platforms Section
========================================= */

#platforms {
  padding: 80px 0 40px 0;
}

#platforms .platform-items {
  margin: 0 -10px;
  padding-top: 10px; /* separates from buttons nicely */
}

#platforms .categories {
  margin: 30px 0 35px; /* adds breathing space above & below */
}

#platforms ol.type {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px; /* clean, even spacing between buttons */
  flex-wrap: nowrap;
}

/* Tighten button feel */
#platforms ol.type li a {
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1;
}

/* Replace Bootstrap columns */
#platforms .platform-card {
  width: 16.666%;
  padding: 12px 10px;
  box-sizing: border-box;
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}

/* Clear floats */
#platforms .platform-items::after {
  content: "";
  display: table;
  clear: both;
}

/* Desktop: allow natural size (like original) */
#platforms .platform-card img {
  display: block;
  margin: 0 auto;
  transition: transform 0.15s ease;
  width: auto;
  height: auto;
  max-width: 100%;
}

/* Tablet */
@media (max-width: 991px) {
  #platforms .platform-card {
    width: 25%;
  }
}

/* Mobile (3 columns) */
@media (max-width: 600px) {
  #platforms .platform-card {
    padding: 10px 8px;
    width: 33.333%;
    min-height: 100px;
  }

  #platforms .platform-card img {
    max-width: 100px;
  }

  #platforms ol.type {
    gap: 6px;
  }

  #platforms ol.type li {
    display: block;
  }

  #platforms ol.type li a {
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap; /* prevents text breaking */
  }
}

@media (hover: hover) {
  #platforms .platform-card:hover img {
    transform: scale(1.05);
  }
}
