/* ==========================================================================
   CodeToolz Knowledge Center — Entrance page (shortcode layout)
   Adapted from the approved UI/UX prototype (index.html). Loads in addition to
   kc-articles.css, which provides the shared tokens, fonts and base `.kc`
   rules plus .card/.card--link, .btn, .search-field and .section-search. Only
   the entrance-specific components live here. All rules are scoped under `.kc`
   so they stay isolated from the theme and Elementor.
   ========================================================================== */

/* Outer wrapper spacing (sits inside the Elementor content column). */
.kc.kc-entrance { --ctkc-section-gap: 32px; padding-top: 0; padding-bottom: 48px; }
/* The sections live inside <main>, so the vertical rhythm is set there. */
.kc.kc-entrance > .ctkc-container { display: flex; flex-direction: column; gap: var(--ctkc-section-gap); }

/* ---------- Icon tiles (used by the info strip and destination cards) ------ */
.kc .icon-tile {
	width: 40px; height: 40px; flex: none; border-radius: 10px;
	display: inline-grid; place-items: center;
	background: var(--ctkc-surface-sunk); border: 1px solid var(--ctkc-line); color: var(--ctkc-navy);
}
.kc .icon-tile .icon { width: 20px; height: 20px; stroke-width: 1.8; }
.kc .icon-tile--lg { width: 48px; height: 48px; border-radius: 12px; }
.kc .icon-tile--lg .icon { width: 24px; height: 24px; }

/* ---------- Card CTA link row ---------------------------------------------- */
.kc .card__cta { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ctkc-blue); }
.kc .card__cta .icon { transition: transform var(--ctkc-ease); }
.kc .card--link:hover .card__cta .icon { transform: translateX(3px); }

/* ---------- Section A: hero panel (intro + unified search + media) ---------- */
.kc .hero-panel {
	display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); min-height: 420px;
	background: var(--ctkc-surface); border: 1px solid var(--ctkc-line); border-radius: var(--ctkc-r-panel); box-shadow: var(--ctkc-sh-xs);
}
/* overflow:hidden lives on the media (not the panel) so the Unified Search
   results panel can overhang the hero, as in the prototype. */
.kc .hero__text { padding: 56px 40px 56px 56px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.kc .hero__title { font-family: var(--ctkc-font-display); font-size: 60px; line-height: 1.04; font-weight: 700; letter-spacing: -.02em; color: var(--ctkc-ink); white-space: nowrap; }
.kc .hero__intro { font-size: 19px; line-height: 1.65; color: var(--ctkc-ink-soft); max-width: 580px; }
/* Search shares the intro's measure so both left and right edges line up. */
.kc .hero__text .kc-search { max-width: 580px; margin-top: 4px; }
.kc .hero__media { position: relative; min-height: 100%; overflow: hidden; border-radius: 0 var(--ctkc-r-panel) var(--ctkc-r-panel) 0; }
.kc .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%); mask-image: linear-gradient(to right, transparent 0, #000 22%); }

/* ---------- Section B: two destination cards ------------------------------- */
.kc .destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.kc .dest-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; gap: 28px; padding: 20px; border-radius: var(--ctkc-r-panel); }
.kc .dest-card__media { align-self: center; aspect-ratio: 482 / 267; border-radius: 10px; overflow: hidden; background: var(--ctkc-surface-sunk); }
.kc .dest-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.kc .dest-card:hover .dest-card__media img { transform: scale(1.03); }
/* Body content is top-aligned with the CTA pinned to the bottom, so the icon,
   title and CTA rows line up across both cards whatever the text length. */
.kc .dest-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 8px 8px 8px 0; }
.kc .dest-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; align-self: stretch; margin-bottom: 4px; }
.kc .dest-card__title { font-family: var(--ctkc-font-display); font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; color: var(--ctkc-ink); text-wrap: balance; }
.kc .dest-card__text { font-size: 16px; line-height: 1.55; color: var(--ctkc-ink-soft); }
.kc .dest-card .card__cta, .kc .dest-card__cta-pending { margin-top: auto; padding-top: 8px; }
.kc .dest-card .card__cta { font-size: 16px; }
.kc .dest-card .card__cta .icon { width: 18px; height: 18px; }

/* "Browse Resources" has no destination yet: render as a non-link pending card. */
.kc .dest-card--pending { cursor: default; }
.kc .dest-card--pending:hover { border-color: var(--ctkc-line); box-shadow: var(--ctkc-sh-xs); transform: none; }
.kc .dest-card--pending:hover .dest-card__media img { transform: none; }
.kc .dest-card__cta-pending { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--ctkc-ink-muted); }
.kc .dest-badge { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ctkc-ink-muted); background: var(--ctkc-surface-sunk); border: 1px solid var(--ctkc-line); border-radius: 999px; padding: 3px 10px; }

/* ---------- Section C: four explanatory items (not navigation) ------------- */
/* Icon sits above the text so every column has the same structure and width. */
.kc .info-strip { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 32px 0; background: var(--ctkc-surface); border: 1px solid var(--ctkc-line); border-radius: var(--ctkc-r-panel); box-shadow: var(--ctkc-sh-xs); }
.kc .info-strip li { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 0 28px; }
.kc .info-strip li + li { border-left: 1px solid var(--ctkc-line); }
.kc .info-strip strong { display: block; margin-bottom: 6px; font-family: var(--ctkc-font-display); font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--ctkc-ink); }
.kc .info-strip span:not(.icon-tile) { display: block; font-size: 15px; line-height: 1.55; color: var(--ctkc-ink-soft); }

/* ---------- Responsive ----------------------------------------------------- */
@media (max-width: 1040px) {
	.kc.kc-entrance { --ctkc-section-gap: 28px; }
	.kc .hero__text { padding: 48px 32px 48px 40px; }
	.kc .hero__title { font-size: 52px; }
	.kc .dest-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0; }
	.kc .dest-card__body { padding: 24px 8px 8px; }
	.kc .info-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
	.kc .info-strip li:nth-child(3) { border-left: 0; }
}

@media (max-width: 860px) {
	.kc .hero-panel { grid-template-columns: minmax(0, 1fr); }
	.kc .hero__title { white-space: normal; }
	.kc .hero__text { padding: 40px 32px 36px; }
	.kc .hero__text .kc-search, .kc .hero__intro { max-width: none; }
	.kc .hero__media { min-height: 0; aspect-ratio: 1018 / 423; border-radius: 0 0 var(--ctkc-r-panel) var(--ctkc-r-panel); }
	.kc .hero__media img { -webkit-mask-image: none; mask-image: none; }
	.kc .destinations { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
	.kc.kc-entrance { --ctkc-section-gap: 20px; padding-bottom: 32px; }
	/* Elementor's column already supplies the side gutter on phones. */
	.kc.kc-entrance > .ctkc-container { padding: 0; }
	.kc.kc-entrance .search-field .btn { padding: 0 14px; }
	.kc .hero__text { padding: 32px 20px 28px; gap: 18px; }
	.kc .hero__title { font-size: 40px; }
	.kc .hero__intro { font-size: 17px; }
	.kc .dest-card { padding: 14px; }
	.kc .dest-card__body { padding: 20px 6px 6px; }
	.kc .dest-card__title { font-size: 26px; }
	.kc .info-strip { grid-template-columns: minmax(0, 1fr); padding: 4px 0; row-gap: 0; }
	.kc .info-strip li { flex-direction: row; gap: 16px; padding: 20px; }
	.kc .info-strip strong { margin-bottom: 4px; }
	.kc .info-strip li + li { border-left: 0; border-top: 1px solid var(--ctkc-line); }
}

@media (prefers-reduced-motion: reduce) {
	.kc .dest-card:hover .dest-card__media img { transform: none; }
}
