/*
Theme Name: APST v3
Theme URI: https://example.com/apstv3
Author: NOTTECH
Author URI: https://example.com
Description: Bright, friendly education block theme — aqua background, white rounded cards with flat offset shadows, navy text, teal pill buttons and soft scale hover effects. Uses the Prompt font for Thai and English.
Requires at least: 6.6
Requires PHP: 7.4
Version: 3.5.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apstv3
Tags: block-patterns, menus, full-site-editing, custom-colors, editor-style, education, rtl-language-support, wide-blocks
*/

/* ---------- Base ---------- */
body { overflow-x: hidden; }

a { transition: color .3s; }

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

/* ---------- Buttons: pill, grow slightly + fade colour (0.5s) ---------- */
body .wp-element-button,
body .wp-block-button__link,
body input[type="submit"],
body button[type="submit"] {
	display: inline-block;
	transform: scale(1);
	transition: all .5s ease;
	will-change: transform;
	backface-visibility: hidden;
}
body .wp-element-button:hover,
body .wp-element-button:focus-visible,
body .wp-block-button__link:hover,
body .wp-block-button__link:focus-visible,
body input[type="submit"]:hover,
body button[type="submit"]:hover {
	transform: scale(1.1);
}
/* Primary colour fade (also set in theme.json; repeated here so it always wins) */
body .wp-block-button:not([class*="is-style-"]) .wp-block-button__link:hover,
body .wp-block-button.is-style-fill .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--blue-hover);
	color: var(--wp--preset--color--white);
}

/* "Read more" links -> primary pill button
   (Post Excerpt "อ่านต่อ", Read More block, <!--more--> link in content) */
.wp-block-post-excerpt__more-text { margin-top: 1rem; }
body .wp-block-post-excerpt__more-link,
body a.wp-block-read-more,
body a.more-link {
	display: inline-block;
	background-color: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--prompt);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.4;
	padding: 7px 30px;
	border: 0;
	border-radius: 50px;
	text-decoration: none;
	transform: scale(1);
	transition: all .5s ease;
	backface-visibility: hidden;
}
body .wp-block-post-excerpt__more-link:hover,
body .wp-block-post-excerpt__more-link:focus-visible,
body a.wp-block-read-more:hover,
body a.wp-block-read-more:focus-visible,
body a.more-link:hover,
body a.more-link:focus-visible {
	background-color: var(--wp--preset--color--blue-hover);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	transform: scale(1.1);
}

.wp-block-button.is-style-secondary .wp-block-button__link {
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--navy);
	color: var(--wp--preset--color--navy);
	padding: 7px 20px;
	font-weight: 600;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

/* Non-clickable tag (price, class size) */
.wp-block-button.is-style-tag .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--wp--preset--color--navy);
	padding: 7px 15px;
	font-weight: 400;
	cursor: default;
	pointer-events: none;
}

/* ---------- Header pill ---------- */
.apstv3-header-pill {
	border-radius: 100px;
}
/* Logo only in the header: the site name (Settings > General) is still used for the
   browser tab and search results, but never shown next to the logo. */
.apstv3-header-pill .wp-block-site-title { display: none !important; }
.apstv3-header-pill .wp-block-navigation-item__content {
	font-weight: 700;
	padding: 8px 20px;
	border-radius: 30px;
	transition: color .3s;
}
.apstv3-header-pill .wp-block-navigation-item__content:hover,
.apstv3-header-pill .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--teal);
}
.wp-block-navigation .wp-block-navigation__submenu-container {
	border-radius: 15px;
	border: none;
	overflow: hidden;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--white);
}
@media (max-width: 781px) {
	.apstv3-header-pill { border-radius: 0 0 15px 15px; }
}

/* Contact icons (LINE / Facebook / phone): shown on phones only, next to the ☰ button */
.apstv3-header-icons { display: none; }
.apstv3-header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1.5px solid var(--wp--preset--color--navy);
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	box-sizing: border-box;
	transition: transform .5s ease, color .5s ease, border-color .5s ease;
}
.apstv3-header-icon:hover,
.apstv3-header-icon:focus-visible {
	color: var(--wp--preset--color--teal);
	border-color: var(--wp--preset--color--teal);
	transform: scale(1.1);
}

/* ---------- Phone header (matches WordPress's ☰ breakpoint, < 600px) ----------
   Full-width white bar with rounded bottom corners, small logo, icons + ☰,
   and the menu opens as a white panel sliding in from the right. */
@media (max-width: 599px) {
	.apstv3-header {
		padding: 0 !important;
	}
	.apstv3-header-pill {
		padding: 6px 12px !important;
		box-shadow: 0 6px 0 rgba(10, 73, 123, .1);
	}
	.apstv3-header-pill .wp-block-site-title { display: none; }
	.apstv3-header-pill .wp-block-site-logo img {
		width: 40px !important;
		height: auto;
	}
	.apstv3-header-icons {
		display: flex;
		align-items: center;
		gap: 6px;
	}
	.apstv3-header-right { gap: 8px !important; }

	/* ☰ button */
	.apstv3-nav-primary .wp-block-navigation__responsive-container-open {
		color: var(--wp--preset--color--navy);
		padding: 2px;
	}
	.apstv3-nav-primary .wp-block-navigation__responsive-container-open svg {
		width: 34px;
		height: 34px;
	}

	/* Menu panel */
	.apstv3-nav-primary .wp-block-navigation__responsive-container.is-menu-open {
		top: 62px;
		right: 0;
		bottom: auto;
		left: auto;
		width: 64vw;
		max-width: 280px;
		height: auto;
		max-height: calc(100vh - 80px);
		overflow-y: auto;
		padding: 8px 12px 18px !important;
		border-radius: 15px 0 0 15px;
		background: var(--wp--preset--color--white) !important;
		box-shadow: 0 10px 0 rgba(10, 73, 123, .1);
		animation: apstv3-menu-in .35s ease both;
	}
	.admin-bar .apstv3-nav-primary .wp-block-navigation__responsive-container.is-menu-open {
		top: 108px;
		margin-top: 0;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__responsive-close,
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__responsive-dialog {
		max-width: none;
		margin-top: 0 !important;
		padding-top: 0 !important;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__responsive-container-close {
		top: 0;
		right: 0;
		color: var(--wp--preset--color--navy);
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__responsive-container-content {
		padding-top: 30px !important;
		align-items: center !important;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__container,
	.apstv3-nav-primary .is-menu-open .wp-block-navigation-item {
		align-items: center !important;
		text-align: center;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__container {
		gap: 6px !important;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation-item__content {
		font-size: 18px;
		font-weight: 500;
		padding: 6px 12px;
		color: var(--wp--preset--color--navy);
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation-item__content:hover,
	.apstv3-nav-primary .is-menu-open .current-menu-item > .wp-block-navigation-item__content {
		color: var(--wp--preset--color--teal);
	}
	/* Sub-menus inside the panel: plain list, centred */
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__submenu-container {
		padding: 0 !important;
		align-items: center !important;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		font-size: 16px;
		opacity: .85;
	}
	.apstv3-nav-primary .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
		background: transparent;
		color: var(--wp--preset--color--teal);
		opacity: 1;
	}
}
@keyframes apstv3-menu-in {
	from { transform: translateX(100%); }
	to   { transform: translateX(0); }
}

/* ---------- Group block styles ---------- */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 20px solid var(--wp--preset--color--white);
	border-radius: 15px;
	box-shadow: 0 10px 0 rgba(10, 73, 123, .1);
}
.is-style-card-aqua {
	background: var(--wp--preset--color--white);
	border: 20px solid var(--wp--preset--color--white);
	border-radius: 15px;
	box-shadow: 0 10px 0 var(--wp--preset--color--aqua-shadow);
}
.is-style-card-blue {
	background: var(--wp--preset--color--blue-card);
	border: 20px solid var(--wp--preset--color--blue-card);
	border-radius: 20px;
	color: var(--wp--preset--color--white);
}

/* Equal-height cards in Columns: the last card in each column stretches to fill
   the remaining height (works with a title badge above it), and a Buttons block
   at the end of the card sits at the bottom so buttons line up across columns.
   Skipped when the column has a vertical alignment set. */
.wp-block-columns:not([class*="are-vertically-aligned"]) > .wp-block-column:not([class*="is-vertically-aligned"]):has(> .wp-block-group.has-background:last-child, > [class*="is-style-card"]:last-child) {
	display: flex;
	flex-direction: column;
}
.wp-block-columns:not([class*="are-vertically-aligned"]) > .wp-block-column:not([class*="is-vertically-aligned"]) > :is(.wp-block-group.has-background, [class*="is-style-card"]):last-child {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}
.wp-block-columns:not([class*="are-vertically-aligned"]) > .wp-block-column:not([class*="is-vertically-aligned"]) > :is(.wp-block-group.has-background, [class*="is-style-card"]):last-child > * {
	width: 100%;
}
.wp-block-columns:not([class*="are-vertically-aligned"]) > .wp-block-column:not([class*="is-vertically-aligned"]) > :is(.wp-block-group.has-background, [class*="is-style-card"]):last-child > .wp-block-buttons:last-child {
	margin-top: auto !important;
	padding-top: 1.25rem;
}

/* ---------- Heading: title badge ---------- */
.is-style-title-badge {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white) !important;
	width: max-content;
	max-width: 100%;
	padding: 1em 2.25em;
	border-radius: 15px;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center;
}
.is-style-title-badge strong { color: var(--wp--preset--color--teal-bright); }
/* Responsive: padding counts inside the width so the badge never exceeds the screen;
   text wraps, and padding/size shrink on phones */
.is-style-title-badge {
	box-sizing: border-box;
	overflow-wrap: break-word;
}
@media (max-width: 600px) {
	.is-style-title-badge {
		padding: .75em 1.25em;
		font-size: clamp(1.125rem, 5.5vw, 1.5rem) !important;
		line-height: 1.35;
	}
}

/* Pill label (small heading/paragraph with outline) */
.is-style-pill-label {
	border: 1px solid currentColor;
	border-radius: 50px;
	padding: 7px 15px;
	width: max-content;
	max-width: 100%;
}

/* ---------- Image hover (0.5s) ----------
   "Zoom on hover" style: the image zooms inside a rounded frame (like the source's gallery). */
.wp-block-image img,
.wp-block-media-text__media img,
.wp-block-gallery .wp-block-image img,
.wp-block-post-featured-image img,
.wp-block-social-links .wp-social-link {
	transform: scale(1);
	transition: transform .5s ease, opacity .5s ease;
	backface-visibility: hidden;
}
/* Image / Media & Text blocks inserted on their own don't grow on hover.
   Hover is kept only for images in content lists (post cards, Latest Posts),
   galleries, and blocks given the "Zoom on hover" or "Icon hover" style. */
body.home .wp-block-latest-posts__featured-image img {
	transition: transform .5s ease;
	backface-visibility: hidden;
}
body.home .wp-block-latest-posts__featured-image:hover img {
	transform: scale(1.1);
}

/* Zoom inside frame: gallery, featured images, and the "Zoom on hover" style */
.wp-block-image.is-style-zoom,
.wp-block-gallery .wp-block-image,
.wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 15px;
}
.wp-block-image.is-style-zoom:hover img,
.wp-block-gallery .wp-block-image:hover img,
.wp-block-post-featured-image:hover img {
	transform: scale(1.1);
}

/* Icons grow a bit more */
.wp-block-image.is-style-icon-hover:hover img,
.wp-block-social-links .wp-social-link:hover {
	transform: scale(1.1);
}

/* Opt out: add the CSS class "no-hover" to an image block */
.wp-block-image.no-hover:hover img { transform: none; }

/* Paragraphs and Preformatted: airy line height for Thai text (Prompt).
   Beats Global Styles; a line height set on the block itself still wins. */
.wp-site-blocks p,
.wp-site-blocks .wp-block-preformatted {
	line-height: 1.7;
}

/* Lists: tighter line height than body text (1.6), so bullets don't look far apart.
   A line height set on the List block in the editor still wins. */
body .wp-block-list { line-height: 1.4; }

/* Embeds (YouTube) */
.wp-block-embed iframe { border-radius: 20px; }

/* ---------- Post cards in query loops ---------- */
.apstv3-post-card {
	transition: transform .5s;
}
.apstv3-post-card:hover { transform: translateY(-4px); }
/* Read more button: keep its own width and sit at the bottom of the card */
.apstv3-post-card > .wp-block-read-more { align-self: flex-start; margin-top: auto; }
/* Hide excerpt text in post lists (keeps the 'อ่านต่อ' link if an older/customised template still uses Post Excerpt) */
body .wp-block-post-template .wp-block-post-excerpt__excerpt { display: none !important; }
body .wp-block-post-template .wp-block-post-excerpt { margin-top: auto; }
body .wp-block-post-template .wp-block-post-excerpt__more-text { margin-top: 0; }

/* Titles in post lists: max 2 lines, then "…" (single post/page shows the full title) */
body .wp-block-post-template .wp-block-post-title,
body .wp-block-query .wp-block-post-title {
	display: -webkit-box !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 2 !important;
	line-clamp: 2;
	overflow: hidden !important;
	text-overflow: ellipsis;
	word-break: break-word;
	line-height: 1.4 !important;
	/* Fallback: never taller than 2 lines even if line-clamp is ignored */
	max-height: calc(1.4em * 2);
}
body .wp-block-post-template .wp-block-post-title a,
body .wp-block-query .wp-block-post-title a {
	display: inline;
}

/* ---------- /* ---------- Latest Posts block & Query Loops added inside pages ----------
   Compact white card (fits 4 per row), rounded 4:3 image,
   bold navy title (3 lines max), optional date. No excerpt, no read-more. */
body .wp-block-latest-posts {
	padding-left: 0;
	list-style: none;
}
body .wp-block-latest-posts.is-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
@media (min-width: 600px) {
	body .wp-block-latest-posts.is-grid:not(.columns-1) { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 782px) {
	body .wp-block-latest-posts.is-grid.columns-3,
	body .wp-block-latest-posts.is-grid.columns-4,
	body .wp-block-latest-posts.is-grid.columns-5,
	body .wp-block-latest-posts.is-grid.columns-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
	body .wp-block-latest-posts.is-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
	body .wp-block-latest-posts.is-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
	body .wp-block-latest-posts.is-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }
}
body .wp-block-latest-posts > li,
body .wp-block-post-template > li:not(:has(.apstv3-post-card, [class*="is-style-card"])) {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	background: var(--wp--preset--color--white);
	border: 10px solid var(--wp--preset--color--white);
	border-radius: 12px;
	box-shadow: 0 6px 0 rgba(10, 73, 123, .1);
	transition: transform .5s;
}
body .wp-block-latest-posts.is-grid > li {
	width: auto !important;
	margin: 0 !important;
}
body .wp-block-latest-posts:not(.is-grid) > li { margin-bottom: 20px; }
body .wp-block-latest-posts > li:hover,
body .wp-block-post-template > li:not(:has(.apstv3-post-card, [class*="is-style-card"])):hover {
	transform: translateY(-4px);
}
body .wp-block-latest-posts__featured-image {
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
}
body .wp-block-latest-posts__featured-image:not(.alignleft):not(.alignright) {
	width: 100%;
}
body .wp-block-latest-posts__featured-image img {
	display: block;
	border-radius: 8px;
}
/* Shorter, uniform images: 4:3, cropped to fill */
body .wp-block-latest-posts__featured-image:not(.alignleft):not(.alignright) img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
body a.wp-block-latest-posts__post-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	word-break: break-word;
	line-height: 1.4;
	max-height: calc(1.4em * 3);
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}
body a.wp-block-latest-posts__post-title:hover,
body .wp-block-post-template .wp-block-post-title a:hover {
	color: var(--wp--preset--color--teal);
}
body .wp-block-post-template .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
body .wp-block-latest-posts__post-author,
body .wp-block-latest-posts__post-date {
	display: block;
	font-size: .8125rem;
	color: var(--wp--preset--color--navy);
	opacity: .75;
}
/* No excerpt text and no "read more" in the Latest Posts block */
body .wp-block-latest-posts__post-excerpt,
body .wp-block-latest-posts__read-more { display: none !important; }
body .wp-block-post-template > li > .wp-block-read-more {
	align-self: flex-start;
	margin-top: auto;
}

Forms: underline inputs ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
	font-family: inherit;
	font-size: 1em;
	color: var(--wp--preset--color--navy);
	background: transparent;
	border: none;
	border-bottom: 1px solid #afafaf;
	border-radius: 0;
	padding: 12px 0;
	transition: border-color .3s;
}
input::placeholder,
textarea::placeholder { color: var(--wp--preset--color--navy); opacity: .7; }
input:hover, input:focus,
textarea:hover, textarea:focus,
select:hover, select:focus {
	border-bottom-color: var(--wp--preset--color--teal);
	outline: none;
}
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--navy);
	border-radius: 50px;
	padding: 8px 18px;
}

/* ---------- Footer links ---------- */
.apstv3-footer a { color: var(--wp--preset--color--navy); }
.apstv3-footer a:hover { color: var(--wp--preset--color--teal); }

/* ---------- Pagination ---------- */
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block;
	min-width: 2.2em;
	padding: .3em .6em;
	border-radius: 50px;
	text-align: center;
	transition: background-color .3s, color .3s;
}
.wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination-numbers a.page-numbers:hover {
	background: var(--wp--preset--color--teal);
	color: var(--wp--preset--color--white);
}

/* ---------- No image hover inside single pages / posts ----------
   Front page (body.home) and post lists keep the grow/zoom effect.
   Header/footer (logo, social icons) are not affected. */
body.page:not(.home) main img,
body.single main img {
	transition: none !important;
}
body.page:not(.home) main .wp-block-image:hover img,
body.page:not(.home) main .wp-block-media-text__media:hover img,
body.page:not(.home) main .wp-block-post-featured-image:hover img,
body.single main .wp-block-image:hover img,
body.single main .wp-block-media-text__media:hover img,
body.single main .wp-block-post-featured-image:hover img {
	transform: none !important;
}
/* Exception: Gallery images keep the zoom-in-frame hover on pages/posts too */
body.page:not(.home) main .wp-block-gallery .wp-block-image img,
body.single main .wp-block-gallery .wp-block-image img {
	transition: transform .5s ease, opacity .5s ease !important;
}
body.page:not(.home) main .wp-block-gallery .wp-block-image:hover img,
body.single main .wp-block-gallery .wp-block-image:hover img {
	transform: scale(1.1) !important;
}

/* ---------- "Enlarge on click" (lightbox): thin white frame around the big image ---------- */
.wp-lightbox-overlay .lightbox-image-container img {
	border: 6px solid var(--wp--preset--color--white);
	border-radius: 12px;
	box-sizing: border-box;
	object-fit: contain;
	background: var(--wp--preset--color--white);
}
/* No hover zoom on the enlarged image */
.wp-lightbox-overlay img,
.wp-lightbox-overlay .wp-block-image:hover img {
	transform: none !important;
	transition: none !important;
}
/* ---------- Query Loop "Slider" style (front page only) ----------
   Cards stay as they are; the list becomes one row that slides, with
   teal ‹ › arrows and page dots (assets/js/slider.js). Pagination is hidden. */
body.home .wp-block-query.is-style-slider .wp-block-query-pagination { display: none; }
body.home .wp-block-query.is-style-slider .apstv3-slider {
	position: relative;
	padding: 0 44px;
}
body.home .wp-block-query.is-style-slider .apstv3-slider.is-single { padding: 0; }
body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template {
	--apstv3-slide-gap: 24px;
	position: relative;
	display: flex !important;
	flex-wrap: nowrap;
	gap: var(--apstv3-slide-gap);
	margin: 0;
	padding: 6px 2px 14px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template::-webkit-scrollbar { display: none; }
body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template > li {
	flex: 0 0 calc((100% - 3 * var(--apstv3-slide-gap)) / 4);
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}
/* Chrome/Edge sometimes skip painting images inside a horizontal scroller
   until hover when they are promoted layers; keep them as normal images. */
body.home .wp-block-query.is-style-slider .apstv3-slider img {
	backface-visibility: visible;
	will-change: auto;
}
body.home .wp-block-query.is-style-slider .apstv3-slider .wp-block-post-featured-image img:not(:hover) {
	transform: none;
}
body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template > li > :is(.apstv3-post-card, [class*="is-style-card"]) {
	height: 100%;
	box-sizing: border-box;
}
@media (max-width: 1023px) {
	body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template > li {
		flex-basis: calc((100% - var(--apstv3-slide-gap)) / 2);
	}
}
@media (max-width: 600px) {
	body.home .wp-block-query.is-style-slider .apstv3-slider { padding: 0 32px; }
	body.home .wp-block-query.is-style-slider .apstv3-slider > .wp-block-post-template > li { flex-basis: 100%; }
}
body.home .wp-block-query.is-style-slider .apstv3-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-top: -24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent !important;
	color: var(--wp--preset--color--teal);
	cursor: pointer;
	transition: transform .5s ease, color .5s ease;
}
body.home .wp-block-query.is-style-slider .apstv3-slider__arrow:hover,
body.home .wp-block-query.is-style-slider .apstv3-slider__arrow:focus-visible {
	color: var(--wp--preset--color--blue-hover);
	transform: scale(1.1);
}
body.home .wp-block-query.is-style-slider .apstv3-slider__arrow--prev { left: 0; }
body.home .wp-block-query.is-style-slider .apstv3-slider__arrow--next { right: 0; }
body.home .wp-block-query.is-style-slider .apstv3-slider.is-single .apstv3-slider__arrow { display: none; }
@media (max-width: 600px) {
	body.home .wp-block-query.is-style-slider .apstv3-slider__arrow { width: 32px; }
}
body.home .wp-block-query.is-style-slider .apstv3-slider__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 14px;
}
body.home .wp-block-query.is-style-slider .apstv3-slider__dots[hidden] { display: none; }
body.home .wp-block-query.is-style-slider .apstv3-slider__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 1.5px solid var(--wp--preset--color--teal);
	border-radius: 50%;
	background: transparent !important;
	cursor: pointer;
	transition: background-color .3s;
}
body.home .wp-block-query.is-style-slider .apstv3-slider__dot.is-active,
body.home .wp-block-query.is-style-slider .apstv3-slider__dot:hover {
	background: var(--wp--preset--color--teal) !important;
}

/* ---------- Buttons: class "apils-btn-full-mobile" on a Buttons block ----------
   On phones the buttons stack, share one width and keep their text on one line. */
@media (max-width: 599px) {
	.apils-btn-full-mobile {
		flex-direction: column;
		align-items: center;
		gap: 12px !important;
	}
	.apils-btn-full-mobile > .wp-block-button {
		width: min(100%, 300px) !important;
		margin: 0 !important;
	}
	.apils-btn-full-mobile > .wp-block-button > .wp-block-button__link {
		width: 100%;
		box-sizing: border-box;
		white-space: nowrap;
		font-size: 16px;
		padding: 10px 18px;
	}
}

/* ---------- Footer contact lines with icons (classes apils-ic-phone / apils-ic-mail) ---------- */
.apils-footer-contact a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}
.apils-footer-contact a:hover { text-decoration: none; }
.apils-ic-phone a::before,
.apils-ic-mail a::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: var(--apils-ic) no-repeat center / contain;
	mask: var(--apils-ic) no-repeat center / contain;
}
.apils-ic-phone a::before {
	--apils-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.2 15.2 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2Z'/%3E%3C/svg%3E");
}
.apils-ic-mail a::before {
	--apils-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1Zm9 7.2L4.5 7v.1L12 12.4l7.5-5.3V7L12 12.2Z'/%3E%3C/svg%3E");
}

/* ---------- Social icons: class "apils-social-outline" -> white circles with a navy outline ---------- */
.apils-social-outline { gap: 10px !important; }
.apils-social-outline .wp-social-link {
	background: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--navy) !important;
	border: 1.5px solid var(--wp--preset--color--navy);
	box-sizing: border-box;
	transition: transform .5s ease, color .5s ease, border-color .5s ease;
}
.apils-social-outline .wp-social-link a { padding: .4em; }
.apils-social-outline .wp-social-link:hover {
	color: var(--wp--preset--color--teal) !important;
	border-color: var(--wp--preset--color--teal);
	transform: scale(1.1);
}

/* ---------- Footer on phones/tablets: everything centred ---------- */
@media (max-width: 781px) {
	.apstv3-footer .wp-block-columns { gap: 22px !important; }
	.apstv3-footer .wp-block-column {
		text-align: center;
		flex-basis: 100% !important;
	}
	.apstv3-footer .wp-block-column > * {
		margin-left: auto !important;
		margin-right: auto !important;
	}
	.apstv3-footer .wp-block-site-logo {
		display: flex;
		justify-content: center;
	}
	.apstv3-footer .wp-block-site-logo img {
		width: 72px !important;
		height: auto;
	}
	.apstv3-footer .wp-block-heading { margin-bottom: 10px !important; }
	.apstv3-footer .wp-block-social-links,
	.apstv3-footer .wp-block-navigation__container {
		justify-content: center !important;
	}
	.apstv3-footer .wp-block-column p { margin-top: 0; margin-bottom: 8px; }
}

/* LINE has no icon in WordPress's social set (it shows a share icon) — draw the LINE logo */
.wp-social-link-line svg { opacity: 0; }
.wp-social-link-line a { position: relative; }
.wp-social-link-line a::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 1.15em;
	height: 1.15em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cdefs%3E%3Cmask%20id%3D%27m%27%3E%3Crect%20width%3D%2724%27%20height%3D%2724%27%20fill%3D%27%23fff%27%2F%3E%3Ctext%20x%3D%2712%27%20y%3D%2713.4%27%20text-anchor%3D%27middle%27%20font-family%3D%27Arial%2C%20sans-serif%27%20font-size%3D%275.6%27%20font-weight%3D%27700%27%20fill%3D%27%23000%27%3ELINE%3C%2Ftext%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Cpath%20mask%3D%27url%28%23m%29%27%20d%3D%27M12%203C6.5%203%202%206.6%202%2011c0%203.9%203.5%207.2%208.3%207.9.3.1.8.2.9.5.1.3.1.7%200%201l-.1.9c0%20.3-.2%201%20.9.5s6-3.5%208.2-6.1c1.2-1.4%201.8-3%201.8-4.7C22%206.6%2017.5%203%2012%203Z%27%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cdefs%3E%3Cmask%20id%3D%27m%27%3E%3Crect%20width%3D%2724%27%20height%3D%2724%27%20fill%3D%27%23fff%27%2F%3E%3Ctext%20x%3D%2712%27%20y%3D%2713.4%27%20text-anchor%3D%27middle%27%20font-family%3D%27Arial%2C%20sans-serif%27%20font-size%3D%275.6%27%20font-weight%3D%27700%27%20fill%3D%27%23000%27%3ELINE%3C%2Ftext%3E%3C%2Fmask%3E%3C%2Fdefs%3E%3Cpath%20mask%3D%27url%28%23m%29%27%20d%3D%27M12%203C6.5%203%202%206.6%202%2011c0%203.9%203.5%207.2%208.3%207.9.3.1.8.2.9.5.1.3.1.7%200%201l-.1.9c0%20.3-.2%201%20.9.5s6-3.5%208.2-6.1c1.2-1.4%201.8-3%201.8-4.7C22%206.6%2017.5%203%2012%203Z%27%2F%3E%3C%2Fsvg%3E") no-repeat center / contain;
	pointer-events: none;
}