/* ==========================================================================
   Tech Connect block theme — component styles
   Global tokens (colors, fonts, layout) come from theme.json; this file
   styles the custom classes used by patterns, the term-grid block, and the
   Query Loop lists.
   ========================================================================== */

:root {
	--green:        #007239;
	--green-dark:   #00602f;
	--blue:         #0099d8;
	--blue-dark:    #0a82b8;
	--blue-tint:    #e8f4fb;
	--green-tint:   #e6f4ec;
	--green-tint-2: #bfe3cd;
	--ink:          #0a0f1c;
	--ink-soft:     #5b6b73;
	--line:         #cbd5e1;
	--line-soft:    #e3e9ed;
	--bg:           #f4f7f9;
	--card:         #fff;
	--radius:       14px;
	--radius-sm:    9px;
	--shadow:       0 1px 3px rgba(16,40,55,.08), 0 6px 18px rgba(16,40,55,.05);
	--shadow-hover: 0 4px 10px rgba(16,40,55,.10), 0 14px 30px rgba(16,40,55,.10);
	--wrap:         1290px;
}

body { background: var(--bg); color: var(--ink); }
.tc-main { padding-bottom: 60px; }
.wp-block-group.tc-main > * { margin-block: 0; }

/* buttons rendered as raw anchors (header, footer) */
.btn {
	display: inline-flex; align-items: center; gap: 6px;
	border: none; cursor: pointer; font: inherit; font-weight: 500; font-size: 14px;
	padding: 7px 12px; border-radius: 6px; background: var(--green); color: #fff;
	box-shadow: 0 1px 1px rgba(0,0,0,.05); text-decoration: none;
}
.btn:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--bg); }
.btn.sm { padding: 7px 12px; font-size: 14px; }

/* ---------- Header: green top bar ---------- */
.topbar { background: var(--green); color: #fff; }
.topbar .inner {
	max-width: 100%; margin: 0 auto; padding: 7px 20px;
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar .brand-agile { display: flex; align-items: center; }
.topbar .brand-agile img { height: 36px; width: auto; display: block; }
.topbar .spacer { flex: 1; }
.topbar .util { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #fff; }
.topbar .util a { display: inline-flex; }
.topbar .util .util-ic { height: 22px; width: auto; display: block; filter: brightness(0) invert(1); }
.topbar .util .glyph { cursor: pointer; display: inline-flex; }

/* ---------- Page bar ---------- */
.masthead { background: #fff; border-bottom: 1px solid var(--line); height: 50px; display: flex; align-items: center; }
.masthead .inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; width: 100%; display: flex; align-items: center; gap: 16px; }
.masthead .logo-img { height: 22px; width: auto; display: block; }
.masthead .logo { display: flex; align-items: center; }

/* ---------- Hero ---------- */
.hero {
	background:
		radial-gradient(circle at 88% 18%, rgba(43,169,224,.18), transparent 38%),
		linear-gradient(180deg, var(--blue-tint), #f4fafd);
	border-bottom: 1px solid var(--line);
}
.hero.brand-bg {
	background:
		linear-gradient(90deg, var(--blue-tint) 45%, rgba(232,244,251,.4) 70%, transparent 100%),
		url("../img/hero-bg.png") right center / auto 100% no-repeat,
		linear-gradient(180deg, var(--blue-tint), #f4fafd);
}
.hero .hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--blue); margin: 0 0 6px; }
.hero h1 { font-size: clamp(27px, 4vw, 34px); margin: 0 0 8px; }
.hero .lead { font-size: 17px; color: var(--ink-soft); margin: 0 0 22px; max-width: 620px; }

/* search block */
.tc-search-lg { max-width: 640px; }
.tc-search-lg .wp-block-search__inside-wrapper {
	background: #fff; border: 1px solid var(--line); border-radius: 12px;
	padding: 6px 6px 6px 18px; box-shadow: var(--shadow);
}
.tc-search-lg .wp-block-search__input { border: none; background: transparent; font-size: 16px; outline: none; }
.tc-search-lg .wp-block-search__button {
	background: var(--blue); color: #fff; border: none; border-radius: 8px; margin: 0; padding: 10px 18px; font-weight: 600;
}
.tc-search-lg .wp-block-search__button:hover { background: var(--blue-dark); }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section.section-tight { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--blue); }

.page-head { padding: 22px 0 18px; }
.page-head h1, .page-head .wp-block-query-title { font-size: 28px; margin: 4px 0 6px; }
.page-head .eyebrow { margin-bottom: 4px; }
.page-head p, .page-head .wp-block-term-description { color: var(--ink-soft); margin: 0; max-width: 700px; }

/* ---------- Card grids (term-grid block) ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cat-card {
	background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
	padding: 22px; box-shadow: var(--shadow); transition: .16s ease; display: block; color: inherit; text-decoration: none;
}
.cat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--green-tint-2); text-decoration: none; }
.cat-card .ic {
	width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
	background: var(--green-tint); color: var(--green); margin-bottom: 14px;
}
.cat-card h3 { font-size: 17px; margin: 0 0 5px; color: var(--ink); }
.cat-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }
.cat-card .count { font-size: 13px; font-weight: 600; color: var(--green); }

.app-card {
	background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
	padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
	color: inherit; transition: .16s ease; text-decoration: none;
}
.app-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--green-tint-2); text-decoration: none; }
.app-card .badge {
	width: 42px; height: 42px; border-radius: 10px; flex: none;
	background: linear-gradient(135deg, var(--green), #16a05a); color: #fff;
	display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.app-card h4 { margin: 0; font-size: 15px; color: var(--ink); }
.app-card span { font-size: 13px; color: var(--ink-soft); }

/* ---------- Query Loop lists styled as article rows ---------- */
.tc-list.panel {
	background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
	padding: 6px 20px; box-shadow: var(--shadow);
}
.tc-list .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.article-row { padding: 18px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.tc-list li:last-child .article-row,
.article-row:last-child { border-bottom: none; }
.article-row .body { flex: 1; }
.article-row .wp-block-post-title { font-size: 16px; margin: 0 0 4px; }
.article-row .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.article-row .wp-block-post-title a:hover { color: var(--blue); }
.article-row .wp-block-post-excerpt { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; }
.article-row .wp-block-post-excerpt__more-text { display: none; }

.meta-line { font-size: 13px; color: var(--ink-soft); gap: 14px; align-items: center; }
.meta-line > * { margin: 0; }

/* chips (post-terms with separator set to a space) */
.is-chips { font-size: 0; }
.is-chips a {
	display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
	background: var(--green-tint); color: var(--green); text-decoration: none; margin-right: 6px;
}
.is-chips a:hover { text-decoration: none; filter: brightness(.96); }
.is-chips.is-chips-alt a { background: var(--blue-tint); color: var(--blue-dark); }

/* App archives are already scoped to one app. Hide topic chips here even if
   an older template copy saved in the Site Editor still prints them. */
.tax-application .taxonomy-topic { display: none; }

/* ---------- Article ---------- */
.article-head { margin-bottom: 6px; }
.article-head .wp-block-post-title { font-size: 30px; margin: 6px 0 10px; }
.article-hero-img img { border-radius: 12px; margin: 8px 0 18px; }
.article-body { font-size: 16px; color: #2a3940; }
.article-body h2 { font-size: 21px; margin: 30px 0 10px; }
.article-body h3 { font-size: 17px; margin: 22px 0 8px; }
.article-body p, .article-body li { color: #33444c; }
.article-body ul, .article-body ol { padding-left: 22px; }

.related-head { font-size: 18px; margin: 34px 0 10px; }

.tc-readtime, .wp-block-post-author-name, .wp-block-post-date { font-size: 13px; color: var(--ink-soft); }

/* ---------- Pagination ---------- */
.pager { justify-content: center; margin-top: 24px; gap: 6px; }
.pager .wp-block-query-pagination-numbers .page-numbers,
.pager .wp-block-query-pagination-previous,
.pager .wp-block-query-pagination-next {
	min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line);
	display: inline-grid; place-items: center; font-size: 14px; color: var(--ink); background: #fff; text-decoration: none;
}
.pager .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Footer ---------- */
.foot { background: var(--footer, #0c2a39); color: #c7d6dd; margin-top: 40px; }
.foot .inner { max-width: var(--wrap); margin: 0 auto; padding: 34px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.foot h5 { color: #fff; font-size: 14px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em; }
.foot a { color: #c7d6dd; display: block; padding: 4px 0; font-size: 14px; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .logo-img { height: 22px; width: auto; filter: brightness(0) invert(1); }
.foot .foot-blurb { color: #9fb4be; font-size: 14px; margin-top: 10px; max-width: 320px; }
.foot .bar { border-top: 1px solid rgba(255,255,255,.12); }
.foot .bar .inner { display: flex; justify-content: space-between; padding: 16px 24px; font-size: 13px; color: #8fa6b1; }

/* ---------- Homepage (front-page) ---------- */
.hero .wp-block-buttons { margin-top: 6px; }
.hero .wp-block-button__link { padding: 10px 20px; }
.hero .is-style-outline .wp-block-button__link { background: transparent; color: var(--green); border: 1px solid var(--green); box-shadow: none; }

.status-cards { gap: 18px; }
.status-card {
	background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
	padding: 22px; box-shadow: var(--shadow); height: 100%;
}
.status-card.is-ok { border-color: var(--green-tint-2); }
.status-card .pill {
	display: inline-block; margin: 0 0 10px; font-size: 12px; font-weight: 600; padding: 3px 10px;
	border-radius: 999px; background: var(--info-tint, #e8f4fb); color: var(--blue-dark);
}
.status-card .pill.pill-ok { background: var(--green-tint); color: var(--green); }
.status-card h3 { font-size: 17px; margin: 0 0 6px; }
.status-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }
.status-card .card-link { margin: 0; }
.status-card .card-link a { font-size: 14px; font-weight: 600; color: var(--green); }

.home-cols { gap: 30px; }
.links-panel .links-head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 18px 0 8px; }
.links-panel .links-head:first-child { margin-top: 0; }
.links-panel ul { margin: 0; padding-left: 0; list-style: none; }
.links-panel li { padding: 4px 0; }
.links-panel p { margin: 0 0 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
	.foot .inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
	.hero .hero-inner { padding: 0 20px; }
}
