/* Site chrome: header, nav, slider, hero, footer (not injected into block editor). */

/* Skip link: GP Customizer may inject legacy green that fails AA on #f7f8f9. */
a.screen-reader-text.skip-link:focus {
	color: var(--atesteo-green) !important;
}

/* ===== Back to top ===== */
a.generate-back-to-top {
	bottom: 24px;
	right: 24px;
	width: 44px;
	height: 44px;
	line-height: 44px;
	border-radius: 50%;
	background-color: var(--atesteo-green);
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	z-index: 100;
}

a.generate-back-to-top:hover,
a.generate-back-to-top:focus {
	background-color: var(--atesteo-green);
	color: #fff;
}

a.generate-back-to-top svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* ===== Site title (logo only) ===== */
.site-header .main-title,
.site-header .site-description {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== Header ===== */
.site-header {
	border-bottom: 1px solid #e5e8eb;
}

.site-header .inside-header {
	align-items: center;
	padding-top: 12px;
	padding-bottom: 12px;
}

.site-header .header-image.is-logo-image {
	max-height: 56px;
	width: auto;
	height: auto;
}

.atesteo-header-contact {
	margin-left: auto;
	font-size: 14px;
	color: #333;
	line-height: 1.4;
	white-space: nowrap;
}

/* When nav floats in header, keep gap before menu */
.nav-float-right .atesteo-header-contact {
	margin-right: 1.25em;
}

/* Layout only — color comes from .btn-orange / .btn-green */
.atesteo-header-contact a.atesteo-contact-btn {
	margin-left: 0.5em;
}

.atesteo-header-contact a.atesteo-header-tel {
	color: inherit;
	text-decoration: none;
}

.atesteo-header-contact a.atesteo-header-tel:hover,
.atesteo-header-contact a.atesteo-header-tel:focus {
	text-decoration: underline;
}

@media (max-width: 768px) {
	.atesteo-header-contact {
		display: block;
		margin-left: 0;
		margin-right: 0;
		margin-top: 0.5em;
		width: 100%;
		text-align: right;
		white-space: normal;
		font-size: 12px;
		line-height: 1.5;
	}

	.nav-float-right .atesteo-header-contact {
		margin-right: 0;
	}

	.atesteo-header-contact a.atesteo-contact-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin-left: 0.35em;
		margin-top: 0.25em;
		font-size: 14px;
		line-height: 1;
		height: 32px;
		min-height: 32px;
		vertical-align: middle;
	}
}

/* ===== Navigation (below header style) ===== */
.main-navigation {
	background-color: #fff;
	border-bottom: 1px solid #e5e8eb;
	font-family: var(--atesteo-font-family);
}

/* Gap between items so adjacent hover/current greens do not merge */
.main-navigation .main-nav > ul > li {
	margin: 0 3px;
}

/*
 * Nav bar height is controlled by GP’s line-height (default 60px / menu_item_height).
 * Override that — not padding-top/bottom — when tightening vertical space.
 */
.main-navigation .main-nav > ul > li > a,
.main-navigation .menu-bar-item > a,
.main-navigation .menu-toggle {
	line-height: 48px;
	padding-top: 0;
	padding-bottom: 0;
}

.main-navigation .main-nav > ul > li > a {
	font-size: 1.12em;
	font-weight: 400;
	letter-spacing: 0.02em;
	/* Same as body text (GP global --contrast) */
	color: var(--contrast, #222222) !important;
	border-radius: 2px;
	transition:
		color 0.15s ease,
		background-color 0.15s ease,
		box-shadow 0.15s ease;
}

.main-navigation .navigation-search input[type="search"] {
	height: 48px;
}

/* Beat GP customizer --accent blue on hover/current (between mid and soft) */
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]).sfHover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .menu-bar-item:hover > a,
.main-navigation .menu-bar-item.sfHover > a {
	color: #045f5d !important;
	background-color: #e8f5f4;
	box-shadow: inset 0 -2px 0 rgba(0, 134, 132, 0.4);
}

/*
 * Emphasize current / hovered labels without font-weight change
 * (weight 700 widens glyphs and shifts “ドライブトレイン試験” etc.).
 */
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .menu-bar-item:hover > a,
.main-navigation .menu-bar-item.sfHover > a {
	font-weight: 400;
	text-shadow:
		0.03em 0 0 currentColor,
		-0.03em 0 0 currentColor;
}

.main-navigation .main-nav ul ul a {
	font-size: 0.98em;
	font-weight: 400;
	color: var(--contrast, #222222) !important;
}

.main-navigation .main-nav ul ul li:hover > a,
.main-navigation .main-nav ul ul li.sfHover > a,
.main-navigation .main-nav ul ul li[class*="current-menu-"] > a {
	color: #045f5d !important;
	background-color: #eff8f7;
}

/* ===== Hide page titles (賢威相当) ===== */
.page .entry-header {
	display: none;
}

.home.page .entry-header {
	display: none;
}

/* Tighten top padding when a hero/slider sits above content */
.has-atesteo-slider .site-content,
.has-atesteo-page-hero .site-content {
	padding-top: 0;
}

.has-atesteo-slider .inside-article,
.has-atesteo-page-hero .inside-article {
	padding-top: 1.5em;
}

/* ===== Front slider ===== */
.atesteo-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #1a1a1a;
	line-height: 0;
}

.atesteo-slider__track {
	position: relative;
	width: 100%;
}

.atesteo-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
	pointer-events: none;
}

.atesteo-slider__slide.is-active {
	position: relative;
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

.atesteo-slider__slide picture {
	display: block;
	width: 100%;
	line-height: 0;
}

.atesteo-slider__slide img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 56vh;
	object-fit: cover;
	object-position: center;
}

.atesteo-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 4px;
	line-height: 1;
}

/* Visual 10px dot; hit area ≥44px via padding + background-clip (PSI tap targets). */
.atesteo-slider__dot {
	box-sizing: content-box;
	width: 10px;
	height: 10px;
	padding: 17px;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.55);
	background-clip: content-box;
	cursor: pointer;
}

.atesteo-slider__dot.is-active,
.atesteo-slider__dot:hover {
	background-color: var(--atesteo-green);
	background-clip: content-box;
}

@media (prefers-reduced-motion: reduce) {
	.atesteo-slider__slide {
		transition: none;
	}
}

/* ===== Page hero banners ===== */
.atesteo-page-hero {
	width: 100%;
	line-height: 0;
	background: #f0f0f0;
	overflow: hidden;
}

.atesteo-page-hero__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: cover;
	object-position: center;
}

/* ===== Footer ===== */
/*
 * Widget Options hides desktop/tablet-only widgets below ~767px
 * (body .extendedwopts-show.extendedwopts-tablet:not(.extendedwopts-mobile)).
 * Footer address / links must stay visible on all viewports — beat that rule.
 */
body .footer-widgets .extendedwopts-show,
body .footer-widgets .extendedwopts-show.extendedwopts-tablet:not(.extendedwopts-mobile),
body .footer-widgets .extendedwopts-show.extendedwopts-desktop {
	display: block !important;
}

.footer-widgets,
.site-info {
	background-color: #5d656c;
	color: #fff;
}

.footer-widgets {
	/* Top/bottom handled on .footer-widgets-container (GP default is 40px all sides). */
	padding-top: 0;
	padding-bottom: 0;
}

.footer-widgets .footer-widgets-container {
	padding-top: 1.25em;
	padding-bottom: 0.35em;
}

.footer-widgets .inside-footer-widgets {
	display: flex; /* was in GP widget-areas.css — kept here so that file can be dropped */
	align-items: flex-start;
	/* Vertical rhythm between the 5 groups (also used when stacked) */
	--atesteo-footer-group-gap: 1em;
	/* Horizontal gutter straddling the center on wide viewports */
	--atesteo-footer-center-gap: 8em;
	gap: var(--atesteo-footer-group-gap);
}

.footer-widgets .inside-footer-widgets > div {
	flex: 1 1 0;
}

/* Kill GP’s asymmetric column padding (40px only on the right column). */
.site-footer .footer-widgets .footer-widgets-container .inner-padding {
	padding: 0 !important;
}

.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets {
	margin-left: 0 !important;
}

/*
 * Wide: columns meet at center with equal gutter.
 * Left stack sits near center (not page-left) but text is left-aligned
 * so the 3 groups share one leading edge.
 */
@media (min-width: 769px) {
	.footer-widgets .inside-footer-widgets {
		gap: var(--atesteo-footer-center-gap, 2em);
	}

	.footer-widgets .footer-widget-1 {
		display: flex;
		justify-content: flex-end; /* block toward center, not page edge */
	}

	.footer-widgets .footer-widget-2 {
		display: flex;
		justify-content: flex-start;
	}

	.footer-widgets .footer-widget-1 .widget,
	.footer-widgets .footer-widget-2 .widget {
		width: auto;
		max-width: 100%;
	}

	.footer-widgets .footer-widget-1 .atesteo-footer-stack,
	.footer-widgets .footer-widget-2 .atesteo-footer-stack {
		align-items: flex-start;
		text-align: left;
	}
}

.footer-widgets a,
.site-info a,
.footer-widgets .has-white-color {
	color: #fff !important;
}

.footer-widgets a:hover,
.site-info a:hover {
	/* #8fdad8 on #5d656c fails AA (~3.7:1); use a lighter teal. */
	color: #b8f0ee !important;
}

.footer-widgets .widget,
.footer-widgets .atesteo-footer-stack,
.footer-widgets .atesteo-footer-group,
.site-info,
.site-info .copyright {
	font-size: var(--atesteo-body-size, 16px);
	line-height: var(--atesteo-line-height, 1.7);
}

.footer-widgets .widget {
	background: transparent !important;
	color: #fff;
	margin-bottom: 0;
	border: 0;
	padding: 0;
	font-family: inherit;
}

.footer-widgets .widget_block {
	box-shadow: none;
}

/* 5 groups: equal gap inside each column stack */
.footer-widgets .atesteo-footer-stack {
	display: flex;
	flex-direction: column;
	gap: var(--atesteo-footer-group-gap, 1em);
}

.footer-widgets .atesteo-footer-group {
	margin: 0;
	padding: 0;
}

.footer-widgets .atesteo-footer-group a {
	text-decoration: none;
}

.footer-widgets .atesteo-footer-group--legal a {
	display: block;
}

.footer-widgets .atesteo-footer-group--contact .icon_mail {
	margin-right: 0.25em;
}

.site-info {
	padding-top: 0.4em;
	padding-bottom: 0.75em;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.site-info .copyright-bar {
	color: #fff;
	text-align: center;
}

@media (max-width: 768px) {
	.footer-widgets .footer-widgets-container {
		padding-top: 1em;
		padding-right: 1.25em;
		padding-bottom: 0.35em;
		padding-left: 1.25em;
	}

	.footer-widgets .inside-footer-widgets {
		flex-direction: column;
		align-items: stretch;
		gap: var(--atesteo-footer-group-gap, 1em);
	}

	.footer-widgets .footer-widget-1 .atesteo-footer-stack,
	.footer-widgets .footer-widget-2 .atesteo-footer-stack {
		align-items: flex-start;
		text-align: left;
	}

	/* Kill GP mobile 40px between stacked footer columns */
	.footer-widgets .inside-footer-widgets > div,
	.footer-widgets .inside-footer-widgets > div:not(:last-child) {
		margin-bottom: 0 !important;
		margin-top: 0 !important;
		padding-bottom: 0;
	}

	.site-footer .footer-widgets .footer-widgets-container .inner-padding {
		padding: 0 !important;
	}

	.site-info {
		padding-top: 0.5em;
		padding-bottom: 0.85em;
	}

	.site-info .inside-site-info {
		padding-left: 1.25em;
		padding-right: 1.25em;
	}
}
