/* Our Apps page. Figma "Our Apps · Desktop 1440" (53:4) + "Our Apps · Mobile 390" (279:247) */

/* ---------- Apps grid (53:70) ---------- */
.apps { background: var(--sky); padding: var(--hero-top) 0 110px; }
.apps__title {
  font-weight: 700; font-size: 60px; line-height: 66px;
  text-align: center; color: var(--ink);
}

/* Category chips (210:247) */
.apps__filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 32px;
}
.chip {
  padding: 8px 20px;
  border-radius: 999px;
  background: #fff;
  font-weight: 700; font-size: 15px; line-height: 21px;
  color: var(--text);
  white-space: nowrap;
  transition: color .15s, box-shadow .15s;
}
.chip:hover { color: #4C96FF; box-shadow: var(--shadow-soft); }
.chip.is-active { background: var(--grad); color: #fff; }

/* Mobile dropdown (281:247 closed / 281:250 open) */
.filter-dd { display: none; position: relative; z-index: 5; margin-top: 20px; }
.filter-dd__btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 15px 20px;
  border-radius: 16px;
  background: #4C96FF;
  font-weight: 800; font-size: 17px; line-height: 23px;
  color: #fff;
  text-align: left;
}
.filter-dd__chev { width: 14px; height: 7px; overflow: visible; transition: rotate .2s; }
.filter-dd__btn[aria-expanded="true"] { border-radius: 16px 16px 0 0; }
.filter-dd__btn[aria-expanded="true"] .filter-dd__chev { rotate: 180deg; }
.filter-dd__list {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 6px 0 10px;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}
.filter-dd__opt {
  padding: 13px 20px;
  font-weight: 700; font-size: 16px; line-height: 22px;
  color: var(--text);
  cursor: pointer;
}
.filter-dd__opt:hover, .filter-dd__opt:focus { outline: none; background: var(--sky); }
.filter-dd__opt[aria-selected="true"] { color: #4C96FF; }

/* Cards (53:72) */
.apps__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1132px;
  margin: 32px auto 0;
}
.app-card {
  display: flex; flex-direction: column; gap: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
}
.app-card[hidden] { display: none; }
.app-card__top { display: flex; align-items: flex-start; gap: 14px; }
.app-card__icon { flex: none; width: 82px; height: 82px; border-radius: 20px; object-fit: cover; }
.app-card__text { flex: 1 1 auto; min-width: 0; }
.app-card__name {
  margin-bottom: 6px;
  white-space: nowrap;
  font-weight: 700; font-size: 20px; line-height: 22px;
  color: var(--ink);
}
.app-card__desc {
  height: 60px;
  overflow: hidden;
  font-size: 14px; line-height: 20px; letter-spacing: .03em;
  color: var(--text);
}
.app-card__more {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  margin-top: auto;
  padding: 13px;
  border: 2px solid #4C96FF;
  border-radius: 999px;
  font-weight: 700; font-size: 18px; line-height: 25px;
  color: #4C96FF;
  transition: background-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.app-card__more:hover { background: #4C96FF; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(76, 150, 255, .22); }
.app-card__more:active { transform: scale(.96); }

.apps__empty { margin-top: 32px; text-align: center; font-size: 18px; line-height: 26px; color: var(--text); }


/* ================= Responsive ================= */
@media (max-width: 1180px) {
  .apps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 860px; }
}

/* Mobile — Figma 279:302 */
@media (max-width: 899px) {
  .apps { padding: var(--hero-top) 0 48px; }
  .apps .container { max-width: 600px; }
  .apps__title { font-size: 36px; line-height: 66px; text-align: left; }
  .apps__filters { display: none; }
  .filter-dd { display: block; }
  .apps__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .app-card { gap: 16px; }
  .app-card__icon { width: 72px; height: 72px; border-radius: 18px; }
  .app-card__name { white-space: normal; }
  .app-card__desc { height: auto; }
}

/* Tablet — bimiboo.com/apps at 768: chips in one swipeable row, cards in 2 columns */
@media (min-width: 601px) and (max-width: 899px) {
  .apps .container { max-width: none; }
  .apps__title { font-size: 40px; line-height: 1.1; text-align: center; }
  .filter-dd { display: none; }
  .apps__filters {
    display: flex; flex-wrap: nowrap; justify-content: flex-start;
    margin: 24px calc(-1 * var(--gutter)) 0;
    padding: 2px var(--gutter) 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .apps__filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .apps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
}
