/* ==========================================================================
   All Tools directory — all-tools.php
   --------------------------------------------------------------------------
   Site palette: #0A49A6 accent, #9ABAE0 light accent, #031D36 primary.
   ========================================================================== */

.at-section{padding:70px 0 90px;}

/* ── Search ──────────────────────────────────────────────────────────────── */
.at-search{
  position:relative;
  max-width:620px;
  margin:0 auto 22px;
}
.at-search__ico{
  position:absolute;left:18px;top:50%;transform:translateY(-50%);
  color:#8a95a1;pointer-events:none;display:flex;
}
.at-search input{
  width:100%;
  font:inherit;font-size:16px;color:#031D36;
  background:#fff;
  border:1.5px solid #dfe5ec;border-radius:999px;
  padding:15px 46px 15px 52px;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.at-search input::placeholder{color:#9aa5b1;}
.at-search input:focus{
  outline:none;border-color:#0A49A6;
  box-shadow:0 0 0 4px rgba(10,73,166,.12);
}
.at-search input::-webkit-search-cancel-button{-webkit-appearance:none;}
.at-search__clear{
  position:absolute;right:14px;top:50%;transform:translateY(-50%);
  width:26px;height:26px;padding:0;
  border:0;border-radius:50%;
  background:#eef1f5;color:#5c6873;
  font-size:18px;line-height:1;cursor:pointer;
}
.at-search__clear:hover{background:#dfe5ec;color:#031D36;}

/* ── Category pills ──────────────────────────────────────────────────────── */
.at-filters{
  display:flex;flex-wrap:wrap;justify-content:center;gap:8px;
  margin-bottom:14px;
}
.at-pill{
  border:1px solid #dfe5ec;border-radius:999px;
  background:#fff;color:#425365;
  padding:8px 18px;
  font-size:13.5px;font-weight:700;
  cursor:pointer;
  transition:background .16s ease, border-color .16s ease, color .16s ease;
}
.at-pill:hover{border-color:#9ABAE0;color:#0A49A6;}
.at-pill.is-on{background:#0A49A6;border-color:#0A49A6;color:#fff;}
.at-pill:focus-visible{outline:2px solid #0A49A6;outline-offset:2px;}

.at-count{
  text-align:center;font-size:13.5px;color:#7c8792;
  margin:0 0 34px;min-height:20px;
}

/* ── Groups ──────────────────────────────────────────────────────────────── */
.at-group{margin-bottom:46px;}
.at-group[hidden]{display:none;}

.at-group__title{
  display:flex;align-items:center;gap:10px;
  font-size:21px;font-weight:800;color:#031D36;
  margin:0 0 18px;
}
.at-group__ico{
  width:38px;height:38px;flex:0 0 38px;border-radius:10px;
  background:#eef4fc;color:#0A49A6;
  display:flex;align-items:center;justify-content:center;
}
.at-group__n{
  font-size:12px;font-weight:700;color:#7c8792;
  background:#f1f4f8;border-radius:999px;padding:3px 9px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.at-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(288px,1fr));
  gap:16px;
}

.at-card{
  position:relative;
  display:flex;align-items:flex-start;gap:14px;
  background:#fff;
  border:1px solid #e7ebf0;border-radius:14px;
  padding:18px;
  text-decoration:none;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.at-card:hover{
  border-color:#9ABAE0;
  box-shadow:0 12px 28px rgba(3,29,54,.09);
  transform:translateY(-2px);
}
.at-card:focus-visible{outline:2px solid #0A49A6;outline-offset:2px;}
.at-card[hidden]{display:none;}

.at-card__ico{
  width:44px;height:44px;flex:0 0 44px;border-radius:11px;
  background:#eef4fc;color:#0A49A6;
  display:flex;align-items:center;justify-content:center;
  transition:background .18s ease, color .18s ease;
}
.at-card:hover .at-card__ico{background:#0A49A6;color:#fff;}

.at-card__body{display:flex;flex-direction:column;gap:4px;min-width:0;}
.at-card__name{
  font-size:15.5px;font-weight:700;color:#031D36;line-height:1.3;
}
.at-card__desc{
  font-size:13px;line-height:1.5;color:#5c6873;
  /* Two lines keeps every card the same height whatever the copy length. */
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.at-card__cat{
  margin-top:2px;
  font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:#9aa5b1;
}

.at-card__lock{
  position:absolute;top:14px;right:14px;
  width:24px;height:24px;border-radius:50%;
  background:#f1f4f8;color:#7c8792;
  display:flex;align-items:center;justify-content:center;
}
.at-card:hover .at-card__lock{background:#eef4fc;color:#0A49A6;}

.at-empty{
  text-align:center;font-size:16px;color:#5c6873;
  padding:44px 20px;margin:0;
}
.at-empty a{color:#0A49A6;font-weight:700;text-decoration:underline;}

/* ── Sign-up nudge ───────────────────────────────────────────────────────── */
.at-cta{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:22px 34px;
  margin-top:14px;padding:32px 34px;
  background:linear-gradient(135deg,#0A49A6 0%,#073a86 55%,#052a63 100%);
  border-radius:18px;color:#fff;
}
.at-cta h3{font-size:22px;font-weight:800;margin:0 0 6px;color:#fff;}
.at-cta p{margin:0;font-size:15px;color:rgba(255,255,255,.86);max-width:560px;}
.at-cta__actions{display:flex;flex-wrap:wrap;gap:12px;}

.at-btn{
  display:inline-block;
  background:#fff;color:#0A49A6;
  border-radius:999px;padding:13px 28px;
  font-size:15px;font-weight:800;text-decoration:none;white-space:nowrap;
  transition:transform .15s ease, box-shadow .2s ease;
}
.at-btn:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(0,0,0,.22);color:#0A49A6;}
.at-btn--ghost{
  background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.55);
}
.at-btn--ghost:hover{border-color:#fff;color:#fff;}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width:640px){
  .at-section{padding:44px 0 64px;}
  .at-search input{font-size:15px;padding:13px 42px 13px 46px;}
  .at-grid{grid-template-columns:1fr;gap:12px;}
  .at-group{margin-bottom:34px;}
  .at-group__title{font-size:18px;}
  .at-cta{padding:26px 22px;text-align:center;justify-content:center;}
  .at-cta p{margin:0 auto;}
  .at-cta__actions{width:100%;justify-content:center;}
  .at-btn{flex:1 1 auto;text-align:center;}
}

@media (prefers-reduced-motion:reduce){
  .at-card,.at-btn,.at-pill,.at-card__ico{transition:none;}
  .at-card:hover,.at-btn:hover{transform:none;}
}
