/* APILayer Blog template — scoped to .apl-blog so the theme header/footer stay untouched. */

.apl-blog {
	--apl-blue: #1652f0;
	--apl-blue-dark: #0b3fc9;
	--apl-blue-tint: #eaf1fe;
	--apl-band: #edf3fc;
	--apl-ink: #0f172a;
	--apl-text: #334155;
	--apl-muted: #64748b;
	--apl-faint: #94a3b8;
	--apl-line: #e3e8f0;
	--apl-navy: #1d2433;
	--apl-radius: 10px;

	font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--apl-text);
	background: #fff;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	padding-bottom: 72px;
	overflow-x: clip;
}
.apl-blog *, .apl-blog *::before, .apl-blog *::after { box-sizing: border-box; }
.apl-blog h1, .apl-blog h2, .apl-blog h3, .apl-blog p { margin: 0; padding: 0; font-family: inherit; text-transform: none; letter-spacing: normal; }
.apl-blog a { text-decoration: none; color: inherit; box-shadow: none; }
.apl-blog img { max-width: 100%; height: auto; display: block; }
.apl-blog button, .apl-blog input, .apl-blog select { font: inherit; }
.apl-blog :focus-visible { outline: 2px solid var(--apl-blue); outline-offset: 2px; }
.apl-blog .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.apl-wrap {     
	width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(16px, 3vw, 34px); 
}

/* ---------- Top band + heading ---------- */
.apl-top {
	padding-top: 130px;
	background: linear-gradient(180deg, #e6eefb 0%, var(--apl-band) 40%, var(--apl-band) calc(100% - 140px), #fff calc(100% - 140px));
	margin-top: -77px;
}
.apl-heading {
	font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif !important;
	font-size: clamp(40px,7.4vw,86px) !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: -0.045em !important;
	color: var(--apl-ink) !important;
}
.apl-heading span { color: #0052CC }
.apl-subtitle { 
	margin-top: 14px !important;
	font-size: clamp(15px, 1.45vw, 17.5px);
    color: #33445C;
    max-width: 550px;
 }

/* ---------- Hero ---------- */
.apl-hero {
	margin-top: 36px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgb(11 17 26 / .1), 0 30px 60px -24px rgb(11 17 26 / .5);
}
.apl-hero__body { padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; }
.apl-hero__title { 
	font-size: clamp(22px, 2.4vw, 30px) !important;
    font-weight: 720;
    line-height: 1.2;
    letter-spacing: -.026em !important;
    color: var(--apl-ink); 
}
.apl-hero__title a:hover { color: var(--apl-blue); }
.apl-hero__excerpt {  
	margin-top: 12px !important;   
	font-size: 15px;
    line-height: 1.65;
    color: #5d6b7c;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden; 
}
.apl-hero__foot { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.apl-hero__meta { font-size: 13px; color: var(--apl-faint); }
.apl-hero__media { display: block; min-height: 100%; background: var(--apl-blue); }
.apl-hero__media .apl-media-img { width: 100%; height: 100%; object-fit: cover; }

.apl-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 10px 20px; border-radius: 999px;
	background: var(--apl-blue); color: #fff !important;
	font-size: 14px; font-weight: 600;
	transition: background .15s;
}
.apl-btn:hover { background: var(--apl-blue-dark); }

/* ---------- Title banner (fallback thumbnail) ---------- */
.apl-banner {
	container-type: inline-size;
	position: relative;
	width: 100%; height: 100%;
	aspect-ratio: 16 / 9;
	display: flex; align-items: center; justify-content: center;
	padding: 18% 8% 8%;
	color: #fff; text-align: center;
	background:
		linear-gradient(115deg, transparent 54%, rgba(255,255,255,.07) 54%, rgba(255,255,255,.07) 72%, transparent 72%),
		linear-gradient(160deg, #1d5cf5 0%, #1046d6 55%, #0a35b0 100%);
	overflow: hidden;
}
.apl-banner__logo {
	position: absolute; top: 9cqi; left: 7cqi;
	display: inline-flex; align-items: center; gap: 1.6cqi;
	font-size: 4.6cqi; font-weight: 700; letter-spacing: -0.01em;
}
.apl-banner__logo .apl-logo-mark { width: 6cqi; height: 6cqi; }
.apl-banner__text { display: flex; flex-direction: column; align-items: center; gap: 3cqi; }
.apl-banner__title { font-size: 7.4cqi; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.apl-banner__pill {
	display: inline-block; padding: 1.2cqi 3.4cqi; border-radius: 1.6cqi;
	background: #0a1a4a; font-size: 5.2cqi; font-weight: 800; font-style: italic; line-height: 1.1;
	text-wrap: balance; max-width: 100%;
}
.apl-banner.is-long { padding-top: 16%; }
.apl-banner.is-long .apl-banner__title { font-size: 6.2cqi; }
.apl-banner.is-long .apl-banner__pill { font-size: 4.4cqi; }
.apl-banner--hero { aspect-ratio: auto; min-height: 320px; padding: 22% 9% 10%; }
.apl-banner--hero .apl-banner__title { font-size: 6.6cqi; }
.apl-banner--hero .apl-banner__pill { font-size: 4.6cqi; background: #0a1a4a; border: 2px solid rgba(255,255,255,.75); }

/* ---------- Card grid ---------- */
.apl-latest { margin-top: 30px; }
.apl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.apl-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--apl-line); border-radius: var(--apl-radius);
	overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.apl-card:hover { border-color: #c9d6f2; box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .25); }
.apl-card__media { display: block; aspect-ratio: 16 / 9; background: #eef1f6; overflow: hidden; }
.apl-card__media .apl-media-img { width: 100%; height: 100%; object-fit: cover; }
.apl-card__body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.apl-card__title {     
	font-size: 18px;
    font-weight: 650;
    line-height: 1.34;
    letter-spacing: -.016em;
    color: #0e1826;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.apl-card__title a:hover { color: var(--apl-blue); }
.apl-card__excerpt {
	margin-top: 10px !important; font-size: 13px; color: var(--apl-muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.apl-card__meta {
	margin-top: auto; padding-top: 18px;
	display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
	font-size: 11px; color: var(--apl-faint); white-space: nowrap;
}
.apl-card__cat { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--apl-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.apl-card__fmt { flex-shrink: 0; }
.apl-card__cat .apl-icon { width: 13px; height: 13px; color: var(--apl-blue); }
.apl-card__date { margin-left: auto; flex-shrink: 0; }

/* List layout */
.apl-grid.is-list { grid-template-columns: 1fr; gap: 16px; }
.apl-grid.is-list .apl-card { flex-direction: row; }
.apl-grid.is-list .apl-card__media { flex: 0 0 300px; aspect-ratio: 16 / 9; }
.apl-grid.is-list .apl-card__title { font-size: 17px; }

/* ---------- Section heads ---------- */
.apl-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.apl-section-head h2 {font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: clamp(22px, 2.3vw, 29px) !important; line-height: 1.08; font-weight: 700; color: var(--apl-ink); letter-spacing: -.03em !important; }
.apl-section-head p { font-size: 12.5px; color: var(--apl-muted); max-width: 300px; }

/* ---------- Browse by API ---------- */
.apl-browse { margin-top: 64px; }
.apl-browse .apl-section-head { padding-bottom: 14px; border-bottom: 1px solid var(--apl-line); margin-bottom: 14px; }
.apl-browse__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 10px; }

.apl-feature-tile {
	display: flex; flex-direction: column; align-items: flex-start;
	padding: 18px; border-radius: var(--apl-radius);
	background: linear-gradient(160deg, #262e40 0%, var(--apl-navy) 100%);
	color: #fff !important; min-height: 200px;
}
.apl-feature-tile__icon {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: #4b6fd8; color: #fff;
}
.apl-feature-tile__icon .apl-icon { width: 18px; height: 18px; }
.apl-feature-tile__name { margin-top: 26px; font-size: 18px; font-weight: 700; }
.apl-feature-tile__desc { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: #a9b3c6; max-width: 24ch; }
.apl-feature-tile__cta { margin-top: auto; padding-top: 18px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; }
.apl-feature-tile:hover .apl-feature-tile__cta, .apl-feature-tile.is-active .apl-feature-tile__cta { text-decoration: underline; text-underline-offset: 3px; }

.apl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.apl-tile {
	display: flex; align-items: center; gap: 12px;
	padding: 0 16px; min-height: 60px;
	background: #fff; border: 1px solid var(--apl-line); border-radius: var(--apl-radius);
	font-size: 12.5px; color: var(--apl-ink) !important;
	transition: border-color .15s, background .15s;
}
.apl-tile .apl-icon { flex: 0 0 18px; width: 18px; height: 18px; color: var(--apl-blue); }
.apl-tile__name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apl-tile__count { margin-left: auto; font-size: 11.5px; color: var(--apl-faint); }
.apl-tile:hover { border-color: #b9cbf5; }
.apl-tile.is-active { background: var(--apl-blue-tint); border: 1.5px solid #a9c2f7; }

/* ---------- All articles ---------- */
.apl-all { margin-top: 40px; scroll-margin-top: 80px; }
.apl-section-head--all { align-items: baseline; }
.apl-section-head--all p { font-size: 11.5px; color: var(--apl-faint); }
.apl-filterbar { margin: 16px 0 24px; border-top: 1px solid var(--apl-line); border-bottom: 1px solid var(--apl-line); }
.apl-filterbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }

.apl-formats { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.apl-formats__label { color: var(--apl-faint); margin-right: 8px; }
.apl-pill { padding: 5px 10px; border-radius: 6px; font-weight: 600; color: var(--apl-ink) !important; }
.apl-pill span { font-weight: 400; color: var(--apl-faint); margin-left: 2px; }
.apl-pill:hover { background: #f3f6fb; }
.apl-pill.is-active { background: var(--apl-blue-tint); color: var(--apl-blue) !important; }
.apl-pill.is-active span { color: var(--apl-blue); }

.apl-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.apl-search {
	display: flex; align-items: center; gap: 6px;
	height: 32px; padding: 0 12px; border-radius: 999px;
	background: #f3f5f9; border: 1px solid transparent;
}
.apl-search:focus-within { border-color: var(--apl-blue); background: #fff; }
.apl-search svg { width: 13px; height: 13px; fill: none; stroke: var(--apl-faint); stroke-width: 2.4; stroke-linecap: round; }
.apl-search input {
	border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0;
	width: 150px; padding: 0 !important; margin: 0; font-size: 12px; color: var(--apl-ink); height: auto; min-height: 0;
}
.apl-select select {
	height: 32px; padding: 0 30px 0 14px !important; margin: 0;
	border: 1px solid var(--apl-line) !important; border-radius: 999px; background-color: #fff;
	font-size: 12px; font-weight: 600; color: var(--apl-ink);
	appearance: none; -webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 11px center; background-size: 11px;
}
.apl-view { display: inline-flex; padding: 3px; border-radius: 999px; background: #f3f5f9; }
.apl-view button {
	border: 0; background: transparent; cursor: pointer;
	padding: 4px 12px; border-radius: 999px;
	font-size: 12px; font-weight: 600; color: var(--apl-muted); line-height: 1.4;
}
.apl-view button[aria-pressed="true"] { background: #fff; color: var(--apl-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }

/* Pagination & empty state */
.apl-pagination { margin-top: 40px; }
.apl-pagination ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.apl-pagination li { margin: 0; }
.apl-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 12px; border-radius: 999px;
	border: 1px solid var(--apl-line); font-size: 13px; font-weight: 600; color: var(--apl-ink);
}
.apl-pagination a.page-numbers:hover { border-color: var(--apl-blue); color: var(--apl-blue); }
.apl-pagination .current { background: var(--apl-blue); border-color: var(--apl-blue); color: #fff; }
.apl-pagination .dots { border: 0; }
.apl-empty { padding: 64px 0; text-align: center; display: grid; justify-items: center; gap: 18px; color: var(--apl-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.apl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apl-browse__grid { grid-template-columns: 1fr; }
	.apl-feature-tile { min-height: 0; }
	.apl-hero__body { padding: 40px 32px; }
}
@media (max-width: 760px) {
	.apl-top { 
		/* padding-top: 36px; */
	 }
	.apl-hero { grid-template-columns: 1fr; }
	.apl-hero__media { order: -1; }
	.apl-banner--hero { min-height: 0; aspect-ratio: 16 / 9; padding: 18% 8% 8%; }
	.apl-hero__body { padding: 28px 22px; }
	.apl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apl-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
	.apl-grid.is-list .apl-card { flex-direction: column; }
	.apl-grid.is-list .apl-card__media { flex: none; }
	.apl-tools { width: 100%; }
	.apl-search { flex: 1; }
	.apl-search input { width: 100%; }
}
@media (max-width: 560px) {
	.apl-wrap { padding: 0 16px; }
	.apl-grid { grid-template-columns: 1fr; }
	.apl-tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.apl-blog * { transition: none !important; }
}
