/* NameHippo — Responsive/Menu + Grid fixes (scoped overrides)
   Fixes:
   - Mobile navbar collapse + hamburger visibility (Bootstrap collapse had been overridden)
   - Prevent domain cards from overlapping in grids (theme set fixed width)
   - Like button “liked” state stays brand-red (supports multiple class names)
   - Home “Journal” section styling + lightweight hover/float animations
*/

:root{
  --nh-red: rgba(239,68,68,0.95);
  --nh-indigo: rgba(99,102,241,0.95);
  --nh-ink: #101828;
  --nh-muted: #667085;
  --nh-line: rgba(16,24,40,0.10);
  --nh-card: #ffffff;
  --nh-shadow: 0 16px 36px rgba(2,6,23,.10);
}

/* ------------------------------
   1) Navbar collapse / hamburger
   ------------------------------ */

/* Ensure Bootstrap collapse rules win on mobile (theme had display:flex on the collapse element). */
/* Hide the collapsed nav ONLY on mobile. Desktop must always show the menu. */
@media (max-width: 991.98px){
  #nhNav.collapse:not(.show){
    display: none !important;
  }
  #nhNav.collapse.show{
    display: block !important;
  }
}

@media (min-width: 992px){
  /* Theme sometimes overrides collapse on desktop. Hard-enforce visibility. */
  #nhNav{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    height:auto !important;
  }
  #nhNav ul{ display:flex !important; }
}

/* Improve mobile nav panel look (glass on gradient) */
@media (max-width: 991.98px){
  #nhNav{
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 38px rgba(2,6,23,0.22);
  }
  #nhNav ul.navbar-nav{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #nhNav ul.navbar-nav .nav-link > a{
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
  }
}

/* Make hamburger always visible and crisp */
.nh-nav-toggler{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: rgba(255,255,255,0.08);
}
.nh-nav-toggler:focus{
  box-shadow: 0 0 0 .2rem rgba(255,255,255,0.18);
}
/* Force a hamburger icon (some themes remove the BS background-image) */
.nh-nav-toggler .navbar-toggler-icon{
  width: 1.35em;
  height: 1.35em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

/* ------------------------------
   2) Domain cards — prevent overlap
   Theme fixed .nh-sim-card width:280px causing overlap inside Bootstrap grid.
   ------------------------------ */

/* Any bootstrap grid / columns should use fluid card width */
.row .nh-sim-card,
.col .nh-sim-card,
#featured-grid .nh-sim-card{
  width: 100% !important;
  flex: 1 1 auto !important;
  max-width: 100% !important;
}

/* Safety: columns must be shrinkable */
.row > [class*='col']{ min-width: 0; }

/*
  Featured grid (home) was still overlapping on mobile because some theme CSS overrides
  Bootstrap's `.row/.col` layout. Convert just this grid into a safe CSS grid.
*/
#featured-grid{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#featured-grid > .col{
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  position: static !important;
  float: none !important;
}
@media (max-width: 1199.98px){
  #featured-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px){
  #featured-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px){
  #featured-grid{ grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

/* Keep the Similar-domains horizontal scroller behaviour intact */
.nh-similar-scroller .nh-sim-card,
.nh-similar-row .nh-sim-card,
.nh-domain-detail .nh-similar-card .nh-sim-card{
  width: 280px; /* allow scroller cards to stay card-sized */
  flex: 0 0 auto;
}

/* ------------------------------
   3) Like button — keep it brand-red
   JS sometimes toggles classes: liked / is-liked / active
   ------------------------------ */

.nh-sim-card .nh-like-btn.liked,
.nh-sim-card .nh-like-btn.is-liked,
.nh-sim-card .nh-like-btn.active{
  border-color: rgba(239,68,68,0.28) !important;
  background: rgba(239,68,68,0.10) !important;
  color: var(--nh-red) !important;
}
.nh-sim-card .nh-like-btn.liked i,
.nh-sim-card .nh-like-btn.is-liked i,
.nh-sim-card .nh-like-btn.active i,
.nh-sim-card .nh-like-btn.liked svg,
.nh-sim-card .nh-like-btn.is-liked svg,
.nh-sim-card .nh-like-btn.active svg{
  color: var(--nh-red) !important;
}

/* ------------------------------
   4) Home “Journal” section (premium + background)
   ------------------------------ */

.nh-home-journal{
  position: relative;
  overflow: hidden;
  padding: 54px 0;
}
.nh-home-journal::before{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/why-choose-bg.webp") center/cover no-repeat;
  opacity: 0.95;
  transform: scale(1.02);
}
.nh-home-journal::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 20% 20%, rgba(99,102,241,.22) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(900px 420px at 80% 10%, rgba(34,197,94,.16) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(180deg, rgba(255,255,255,.70) 0%, rgba(255,255,255,.92) 55%, rgba(255,255,255,.98) 100%);
}
.nh-home-journal .container{ position: relative; z-index: 2; }

.nh-journal-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.nh-journal-kicker{ font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(16,24,40,.55); font-weight: 800; }
.nh-journal-title{ font-weight: 900; color: var(--nh-ink); letter-spacing: -.02em; margin: 4px 0 6px; }
.nh-journal-sub{ color: var(--nh-muted); max-width: 72ch; margin: 0; }

/* Safety reset: some theme pages apply `text-white` high up in the DOM. */
.nh-home-journal .nh-journal-kicker{ color: rgba(16,24,40,.55) !important; }
.nh-home-journal .nh-journal-title{ color: var(--nh-ink) !important; }
.nh-home-journal .nh-journal-sub{ color: rgba(16,24,40,.62) !important; }
.nh-home-journal .nh-jtitle, .nh-home-journal .nh-jtitle a{ color: var(--nh-ink) !important; }
.nh-home-journal .nh-jexcerpt{ color: rgba(16,24,40,.64) !important; }
.nh-home-journal .nh-jcta{ color: rgba(37,99,235,.95) !important; }

.nh-journal-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
}
@media (max-width: 1199.98px){ .nh-journal-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 991.98px){ .nh-journal-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 575.98px){ .nh-journal-grid{ grid-template-columns: 1fr; } }

.nh-jcard{
  background: var(--nh-card);
  border: 1px solid rgba(16,24,40,0.10);
  border-radius: 26px;
  box-shadow: var(--nh-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.nh-jcard:hover{ transform: translateY(-2px); box-shadow: 0 22px 44px rgba(2,6,23,.14); }

.nh-jcard__media{ position: relative; aspect-ratio: 16/9; background: #eef2ff; overflow:hidden; }
.nh-jcard__media img{ width: 100%; height: 100%; object-fit: cover; display:block; }

.nh-jwm{ position: relative; }
.nh-jwm::after{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/namehippo-watermark.png") center/120px no-repeat;
  opacity: 0.12;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.nh-jcard__body{ padding: 18px 18px 16px; }
.nh-jmeta{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom: 10px; }

/* Multicolor pills (hash-safe) */
.nh-bchip{ display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-weight:800; font-size:12px; letter-spacing:.02em; border:1px solid rgba(16,24,40,.10); background:#fff; color: rgba(16,24,40,.82); }
.nh-bchip.c1{ background: rgba(99,102,241,.14); border-color: rgba(99,102,241,.22); }
.nh-bchip.c2{ background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.22); }
.nh-bchip.c3{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.20); }
.nh-bchip.c4{ background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.22); }
.nh-bchip.c5{ background: rgba(14,165,233,.14); border-color: rgba(14,165,233,.22); }
.nh-bchip.c6{ background: rgba(168,85,247,.14); border-color: rgba(168,85,247,.22); }

.nh-jtitle{ margin: 0 0 8px; font-weight: 950; letter-spacing: -.02em; line-height: 1.08; }
.nh-jtitle a{ text-decoration:none; color: var(--nh-ink); }
.nh-jexcerpt{ color: var(--nh-muted); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nh-jcta{ display:inline-flex; align-items:center; gap:8px; font-weight:800; text-decoration:none; color: rgba(30,64,175,.95); }

/* Secondary stacked cards */
.nh-jstack{ display: grid; gap: 18px; }

/* Lightweight animation (subtle float) */
@media (prefers-reduced-motion: no-preference){
  .nh-jcard{ animation: nhFloat 7s ease-in-out infinite; }
  .nh-jcard:nth-child(2){ animation-duration: 8.2s; }
  .nh-jcard:nth-child(3){ animation-duration: 9s; }
  @keyframes nhFloat{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-3px); } }
  .nh-jcard:hover{ animation: none; }
}

/* ------------------------------------------------------------
   Premium Notifications dropdown (header bell)
   - More premium UI
   - Prevents "blank" action boxes by forcing icon/button styles
------------------------------------------------------------ */
.nh-notif-dd .nh-notif-menu{
  min-width: 360px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 28px 70px rgba(2,6,23,.22);
  overflow: hidden;
  background: rgba(255,255,255,.98);
  backdrop-filter: saturate(140%) blur(10px);
}
.nh-notif-dd .nh-notif-head{
  background: linear-gradient(180deg, rgba(99,102,241,.10), rgba(255,255,255,.98));
}
.nh-notif-dd .nh-notif-list{ max-height: 360px; overflow: auto; }
.nh-notif-dd .nh-notif-list::-webkit-scrollbar{ width: 10px; }
.nh-notif-dd .nh-notif-list::-webkit-scrollbar-thumb{ background: rgba(15,23,42,.14); border-radius: 999px; }

.nh-notif-item{ display:block; text-decoration:none; color: inherit; }
.nh-notif-item + .nh-notif-item{ border-top: 1px solid rgba(15,23,42,.06); }
.nh-notif-item:hover{ background: rgba(99,102,241,.06); }

.nh-notif-row{ display:flex; gap: 12px; align-items:flex-start; padding: 12px 14px; }
.nh-notif-dot{ width: 10px; height: 10px; border-radius: 999px; background: rgba(99,102,241,.95); margin-top: 6px; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(99,102,241,.14); }
.nh-notif-item.is-read .nh-notif-dot{ background: rgba(15,23,42,.18); box-shadow:none; }
.nh-notif-main{ flex: 1 1 auto; min-width: 0; }
.nh-notif-title{ font-weight: 900; letter-spacing: -.01em; line-height: 1.15; color: rgba(15,23,42,.95); }
.nh-notif-body{ color: rgba(51,65,85,.92); font-size: 13px; margin-top: 2px; line-height: 1.25; }
.nh-notif-time{ color: rgba(100,116,139,.95); font-size: 12px; margin-top: 6px; }

.nh-notif-actions{ display:flex; gap: 8px; align-items:center; flex: 0 0 auto; }
.nh-notif-action{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color: rgba(15,23,42,.82);
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}
.nh-notif-action .nh-icn{ width: 16px; height: 16px; display: block; }
.nh-notif-action:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(2,6,23,.12); }
.nh-notif-action:active{ transform: translateY(0); }
.nh-notif-action:disabled{ opacity: .55; box-shadow: none; transform: none; }

@media (max-width: 480px){
  .nh-notif-dd .nh-notif-menu{ min-width: 320px; }
}


/* --- PATCH 2026-02-01: notification dropdown icon visibility hard-fix --- */
.nh-notif-dd .nh-notif-action{
  color: rgba(15,23,42,.90) !important;
}
.nh-notif-dd .nh-notif-action svg,
.nh-notif-dd .nh-notif-action svg *{
  stroke: currentColor !important;
  fill: none !important;
}
.nh-notif-dd .nh-notif-action svg{
  display:block;
}
