/*!
 * Cloudhim home sections (v1.3.2)
 * The hero's job buttons, then the sections between the hero and the feed:
 * the three jobs, most read, free tools, security alerts and the trust strip.
 * Loaded on the home page only, after hero.css.
 */

/* ── Hero: three job buttons (they replace the topic pills and stats) ── */
.ch-hero__jobs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.ch-hero__job {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.05rem; border-radius: .75rem;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04);
  color: #e2e8f0; font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.ch-hero__job .bh-ico { width: 1.05rem; height: 1.05rem; color: #93c5fd; }
.ch-hero__job:hover { border-color: #60a5fa; background: rgba(96, 165, 250, .12); color: #fff; transform: translateY(-1px); }
.ch-hero__job:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.ch-hero__job--primary { border-color: transparent; background: var(--ch-grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(59, 130, 246, .8); }
.ch-hero__job--primary .bh-ico { color: #fff; }
.ch-hero__job--primary:hover { background: var(--ch-grad); filter: brightness(1.08); }
@media (max-width: 1023px) { .ch-hero__jobs { justify-content: center; } }

/* ── Sections ── */
.ch-home { padding: 3.5rem 0 0; }
.ch-home__head { margin-bottom: 1.5rem; }
.ch-home--jobs { padding-top: 3.75rem; }

/* The three jobs */
.ch-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1023px) { .ch-jobs { grid-template-columns: minmax(0, 1fr); } }
.ch-job {
  position: relative; display: flex; flex-direction: column; gap: .7rem;
  padding: 1.5rem 1.4rem 1.35rem; border-radius: 1.1rem;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 60%);
  border: 1px solid #dbe5f5; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  scroll-margin-top: 5.5rem;
}
.ch-job:target { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(147, 197, 253, .35); }
.ch-job__icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .8rem;
  background: var(--ch-grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(59, 130, 246, .9);
}
.ch-job__icon .bh-ico { width: 1.3rem; height: 1.3rem; }
.ch-job__title { margin: .2rem 0 0; font-family: var(--ch-head); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #0f172a; }
.ch-job__text { margin: 0; font-size: .925rem; line-height: 1.6; color: #475569; }
.ch-job__links { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid #eef2f7; }
.ch-job__links li { border-bottom: 1px solid #eef2f7; }
.ch-job__links a {
  display: flex; align-items: center; gap: .75rem; padding: .6rem 0;
  font-size: .9rem; font-weight: 600; line-height: 1.4;
  color: #0f172a; text-decoration: none;
}
.ch-job__links a:hover { color: #2563eb; }
/* Guide thumbnails: the 384×256 "thumbnail" size, shown at 76×51 (3:2). */
.ch-job__thumb {
  flex: 0 0 4.75rem; aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: .5rem; background: #eef2f7; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06);
}
.ch-job__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ch-job__links a:hover .ch-job__thumb img { transform: scale(1.05); }
.ch-job__ltitle { min-width: 0; }
.ch-job__tool {
  display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; justify-self: start;
  margin-top: .25rem; padding: .4rem .75rem; border-radius: 9999px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
  font-size: .8rem; font-weight: 600; text-decoration: none;
}
.ch-job__tool .bh-ico { width: .95rem; height: .95rem; flex-shrink: 0; }
.ch-job__tool:hover { background: #dbeafe; }
.ch-job__more { margin-top: auto; padding-top: .35rem; }

/* Desktop: the icon and the heading share the first row of the card.
   Rows: icon + title, text, guides, tool, then the "All … guides" link,
   which takes the spare height so it lines up across the three cards. */
@media (min-width: 1024px) {
  .ch-job {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr; column-gap: .85rem; row-gap: .7rem;
  }
  .ch-job > * { grid-column: 1 / -1; }
  .ch-job > .ch-job__icon { grid-column: 1; }
  .ch-job > .ch-job__title { grid-column: 2; align-self: center; margin: 0; }
  .ch-job__more { align-self: end; margin-top: 0; }
}

/* Most read */
.ch-most { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1023px) { .ch-most { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ch-most { grid-template-columns: minmax(0, 1fr); } }
.ch-most__item {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 1rem; background: #fff; border: 1px solid #e5e9f0;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ch-most__item:hover { border-color: #c7d7fe; box-shadow: 0 16px 32px -22px rgba(37, 99, 235, .45); transform: translateY(-2px); }
/* Card thumbnail: the 384×256 "thumbnail" size, full card width (3:2). */
.ch-most__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #eef2f7; border-bottom: 1px solid #eef2f7; }
.ch-most__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ch-most__item:hover .ch-most__thumb img { transform: scale(1.04); }
.ch-most__body { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; }
.ch-most__n {
  flex-shrink: 0; font-family: var(--ch-head); font-weight: 800; font-size: 1.6rem; line-height: 1;
  background: var(--ch-hl-light); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #2563eb;
}
.ch-most__cat { display: block; margin-bottom: .25rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.ch-most__title { font-family: var(--ch-head); font-size: .95rem; font-weight: 700; line-height: 1.35; color: #0f172a; text-decoration: none; }
.ch-most__title:hover, .ch-most__item:hover .ch-most__title { color: #2563eb; }
/* The whole card is the link. */
.ch-most__title::after { content: ""; position: absolute; inset: 0; }
@media (max-width: 560px) {
  /* One column on phones: thumbnail beside the text keeps the list short. */
  .ch-most__item--thumb { flex-direction: row; align-items: center; }
  .ch-most__item--thumb .ch-most__thumb { flex: 0 0 7.5rem; align-self: stretch; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid #eef2f7; }
  .ch-most__item--thumb .ch-most__body { padding: .85rem 1rem; }
}

/* Free tools */
.ch-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1023px) { .ch-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ch-tools { grid-template-columns: minmax(0, 1fr); } }
.ch-tool {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .85rem; row-gap: .15rem;
  padding: 1rem 1.1rem; border-radius: 1rem; background: #fff; border: 1px solid #e5e9f0;
  text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ch-tool:hover { border-color: #c7d7fe; transform: translateY(-2px); box-shadow: 0 16px 32px -22px rgba(37, 99, 235, .45); }
.ch-tool__icon {
  grid-row: 1 / span 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem;
  background: #eff6ff; color: #2563eb;
}
.ch-tool__icon .bh-ico { width: 1.2rem; height: 1.2rem; }
.ch-tool__name { font-family: var(--ch-head); font-weight: 700; font-size: .95rem; color: #0f172a; }
.ch-tool__line { font-size: .825rem; line-height: 1.45; color: #64748b; }

/* Security alerts under the feed */
.ch-alerts {
  margin-top: 2rem; padding: 1.15rem 1.35rem; border-radius: 1rem;
  background: #fffbeb; border: 1px solid #fde68a;
}
.ch-alerts__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .65rem; font-family: var(--ch-head); font-size: 1rem; font-weight: 800; color: #78350f; }
.ch-alerts__title .bh-ico { width: 1.1rem; height: 1.1rem; color: #d97706; }
.ch-alerts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1.75rem; }
@media (max-width: 767px) { .ch-alerts__list { grid-template-columns: minmax(0, 1fr); } }
.ch-alerts__list li { display: flex; justify-content: space-between; gap: .75rem; font-size: .875rem; line-height: 1.45; }
.ch-alerts__list a { color: #0f172a; font-weight: 600; text-decoration: none; }
.ch-alerts__list a:hover { color: #b45309; }
.ch-alerts__list time { flex-shrink: 0; color: #92400e; font-size: .8rem; }

/* Who writes it */
.ch-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem;
  margin-top: 3rem; padding: 1.35rem 1.5rem; border-radius: 1.1rem;
  background: linear-gradient(135deg, #f8fafc, #eff6ff); border: 1px solid #e0e7ff;
}
.ch-trust__icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 9999px; background: #fff; color: #2563eb; box-shadow: 0 0 0 1px #dbeafe; }
.ch-trust__icon .bh-ico { width: 1.35rem; height: 1.35rem; }
.ch-trust__text { flex: 1 1 22rem; margin: 0; font-size: .95rem; line-height: 1.6; color: #334155; }
.ch-trust__text strong { color: #0f172a; }
.ch-trust__links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .ch-hero__job:hover, .ch-tool:hover, .ch-most__item:hover { transform: none; }
  .ch-job__links a:hover .ch-job__thumb img, .ch-most__item:hover .ch-most__thumb img { transform: none; }
}
