/* ===== HOME TOOLS DIRECTORY ===== */
.home-tools { margin-top: 18px; }
.home-tools-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}
.home-tools-cta { display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 12px; }
.home-tools-sub { font-size: 1.1rem; font-weight: 700; margin: 14px 0 8px; }

/* grids */
.tool-grid { display:grid; gap:12px; }
.tool-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tool-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tool-group-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }

/* cards */
.tool-card{
  display:block;
  background: var(--card, rgba(255,255,255,0.04));
  border:1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 14px;
  text-decoration:none;
  color: var(--text, #e5e7eb);
  transition: transform .12s ease, border-color .12s ease;
  background: #0f141b;
    border: 1px solid var(--af-border);
}
.tool-card:hover{
  transform: translateY(-2px);
  border-color: rgba(59,130,246,0.6);
}
.tool-emoji{ font-size:1.6rem; margin-bottom:6px; }
.tool-title{ font-weight:700; margin-bottom:4px; }
.tool-desc{ font-size:.92rem; color: var(--muted, #aab0bb); }
.tool-link{ margin-top:8px; font-size:.9rem; color:#93c5fd; font-weight:600; }

.tool-card-row{ display:flex; gap:10px; align-items:flex-start; }

/* trust box */
.trust-box{
  background: var(--card, rgba(255,255,255,0.04));
  border:1px dashed var(--border, rgba(255,255,255,0.12));
  border-radius:12px; padding:14px;
}
.trust-box ul { margin:0 0 8px 18px; color: var(--muted, #aab0bb); }
.trust-disclaimer { font-size:.82rem; color: var(--muted, #9ca3af); margin:0; }

/* ===== Responsive ===== */
@media (max-width: 991px){
  .tool-grid-3 { grid-template-columns: 1fr; }
  .tool-grid-2 { grid-template-columns: 1fr; }
  .tool-group-grid { grid-template-columns: 1fr; }
}


/* ===== MOBILE NAV FIX ===== */
.navbar-toggler { border:1px solid rgba(255,255,255,0.2); }
/*.navbar-toggler-icon { filter: invert(1); } /* makes icon visible on dark bg */

@media (max-width: 991px){
  #navMain{
    background: var(--bg);
    padding: 12px 6px;
    border-top:1px solid rgba(255,255,255,0.08);
    margin-top: 8px;
    border-radius: 10px;
  }
  .navbar-nav .nav-link{
    padding: 10px 12px;
    border-radius: 8px;
  }
  .navbar-nav .nav-link.active{
    background: rgba(59,130,246,0.12);
    color: #fff !important;
  }
}

/* For toggle*/
.collapsible-tool .tool-head{
  width:100%;
  background:transparent;
  border:0;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  text-align:left;
}

.collapsible-tool .chev{
  font-size:1.2rem;
  opacity:.7;
  margin-right:14px;
  transition:transform .25s ease;
}

.collapsible-tool .tool-body{
  overflow:hidden;
  max-height:9999px; 
  opacity:1;
  transition:max-height .35s ease, opacity .2s ease;
}

.collapsible-tool.is-collapsed .tool-body{
  max-height:0;
  opacity:0;
}

.collapsible-tool:not(.is-collapsed) .chev{
  transform:rotate(180deg);
}

@media (max-width:768px){
  .collapsible-tool .tool-body{
    max-height:0;
    opacity:0;
  }
}

/* ---------- Savings Guardrail Coach: mobile shutter ---------- */

/* Make the banner look tappable and add a chevron */
#sgCard .mh-banner {
  position: relative;
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
}

/* Chevron indicator on the right */
#sgCard .mh-banner::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

/* When expanded, rotate chevron */
#sgCard.is-expanded .mh-banner::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Smooth open/close area */
#sgCard .sg-collapsible {
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease;
  max-height: 2000px; /* big enough for desktop open state */
  opacity: 1;
  transform: translateY(0);
}

/* Mobile default: collapsed */
@media (max-width: 768px) {
  #sgCard.is-collapsed .sg-collapsible {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
  }
}


.home-tools-title{
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.2;
  margin: 12px 0 10px;
  background: linear-gradient(90deg, #ffffff, #9fd1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
