/*
Theme Name: Jag365
Theme URI: https://jag365.co.uk
Author: Jag365
Description: Block theme for the Jag365 Business Central blog. Teal and charcoal palette with a gold accent from the Jag365 logo, with bold Archivo headings and Inter body text. Fonts are bundled locally (no Google Fonts calls).
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jag365
Tags: blog, block-styles, full-site-editing, wide-blocks, custom-colors, editor-style
*/

/* Small touches theme.json can't express */

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:where(.wp-site-blocks) *:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary-bright);
	outline-offset: 2px;
}

/* Header */
.jag-header { border-bottom: 4px solid var(--wp--preset--color--primary); box-shadow: 0 2px 10px rgba(20,24,28,.06); }
.jag-header .jag-logo img { height: 64px; width: auto; display: block; }
.jag-header .wp-block-navigation a { font-weight: 600; text-decoration: none; }
.jag-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }

/* Hero */
.jag-hero {
	background-image: radial-gradient(circle at 85% 30%, rgba(60,197,192,.18), transparent 45%),
		linear-gradient(135deg, var(--wp--preset--color--charcoal), var(--wp--preset--color--contrast));
}
.jag-hero mark { background: transparent; }
.jag-hero .is-style-outline .wp-block-button__link { border-color: var(--wp--preset--color--primary-bright); }
.jag-hero .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--primary-bright); color: var(--wp--preset--color--contrast); }

/* Business Central text badge (original icon, not Microsoft's logo) */
.jag-bc-badge {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	margin: 0;
	padding: .35em .95em .35em .75em;
	border: 2px solid var(--wp--preset--color--primary-bright);
	border-radius: 999px;
	color: var(--wp--preset--color--primary-bright);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.4;
}
.jag-bc-badge::before {
	content: "";
	width: 1.15em;
	height: 1.15em;
	background-color: currentColor;
	-webkit-mask: url("assets/images/bc-badge-icon.svg") center / contain no-repeat;
	mask: url("assets/images/bc-badge-icon.svg") center / contain no-repeat;
	flex-shrink: 0;
}
.jag-bc-badge.is-light {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--base);
	font-size: .72rem;
}

/* Slot for the official Business Central logo, added by the site owner */
.jag-bc-logo-slot img { height: 44px; width: auto; display: block; }

/* Post cards */
.jag-card {
	background: var(--wp--preset--color--base);
	border-radius: 10px;
	overflow: hidden;
	height: 100%;
	border-top: 4px solid var(--wp--preset--color--primary);
	box-shadow: 0 1px 0 rgba(20,24,28,.04), 0 6px 18px rgba(20,40,45,.08);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.jag-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20,40,45,.16); border-top-color: var(--wp--preset--color--accent); }
.jag-card .wp-block-post-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.jag-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.jag-card .wp-block-post-featured-image { margin: 0; }
.jag-card .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; }

/* Category pill */
.jag-pill a {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	padding: 0.2em 0.7em;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
}
.jag-pill .wp-block-post-terms__separator { display: none; }
.jag-pill a ~ a { margin-left: .35em; }

/* Article body: inline AL / code */
.wp-block-post-content :where(p, li) code {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	padding: .1em .35em;
	border-radius: 4px;
	font-size: .9em;
}

/* Pagination */
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers {
	text-decoration: none;
	padding: .35em .75em;
	border-radius: 6px;
}
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }

/* Footer */
.jag-footer ul { list-style: none; padding-left: 0; }
.jag-footer li { margin-bottom: .55em; }
.jag-footer a { color: var(--wp--preset--color--primary-bright); text-decoration: none; }
.jag-footer a:hover { color: var(--wp--preset--color--base); text-decoration: underline; }
.jag-footer .jag-logo img { height: 72px; width: auto; }

@media (max-width: 781px) {
	.jag-header .jag-tagline { display: none; }
	.jag-hero .jag-hero-logo { display: none; }
}
@media (max-width: 600px) {
	.jag-header .jag-logo img { height: 48px; }
}
