/*
Theme Name: Altair WordPress Theme
Description: Custom WordPress theme for Altair Motor
Version: 1.0.0
*/

/* ===================================
   Reset / Base
   =================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #000;
	background: #fff;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 400;
	line-height: 1.4;
}

/* ===================================
   Header
   =================================== */

.site-header {
	background-color: #16171a;
	padding: 7px clamp(1rem, 1rem + ((1vw - 0.48rem) * 1.5), 1.5rem);
	position: sticky;
	top: 0;
	z-index: 100;
}

.site-header__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: nowrap;
}

.site-header__logo img {
	width: 280px;
	height: 44px;
	object-fit: contain;
}

/* Nav + 言語切り替えのまとまり */
.site-header__right {
	display: flex;
	align-items: center;
	gap: 2rem;
}

/* ナビゲーション */
.site-header__nav {
	display: flex;
	align-items: center;
}

.nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.nav-menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.nav-menu a,
.nav-menu__parent {
	color: #fff;
	text-decoration: none;
	font-size: 0.875rem;
	white-space: nowrap;
}

.nav-menu__parent {
	cursor: default;
}

.nav-menu a:hover {
	text-decoration: underline;
}

/* サブメニュー */
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #000;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	min-width: 160px;
	z-index: 200;
}

.nav-menu li:hover > .sub-menu {
	display: block;
}

.nav-menu .sub-menu a {
	display: block;
	padding: 8px 16px;
	font-size: 0.8125rem;
}

/* 言語切り替え */
.lang-switcher {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	white-space: nowrap;
}

.lang-switcher a {
	color: #ccc;
	text-decoration: none;
	letter-spacing: 0.05em;
}

.lang-switcher a:hover {
	color: #fff;
}

.lang-switcher__sep {
	color: #555;
}

/* ハンバーガーボタン（モバイル） */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}

.nav-toggle svg {
	fill: #fff;
}

/* ===================================
   Main
   =================================== */

.site-main {
	margin-top: 0;
}

/* ===================================
   Hero Slider (Swiper)
   =================================== */

.altair-hero-slider {
	width: 100%;
	overflow: hidden;
	position: relative;
}

.altair-hero-slider .swiper-container {
	width: 100%;
}

.altair-hero-slider .swiper-slide {
	position: relative;
	overflow: hidden;
}

.altair-hero-slider .slide-inner {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 6;
}

.altair-hero-slider .slide-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	inset: 0;
}

.altair-hero-slider .slide-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 20px 60px;
	color: #eee;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	z-index: 2;
}

.altair-hero-slider .slide-content-title {
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
}

.altair-hero-slider .slide-content-subtitle {
	font-size: 22px;
	font-weight: 400;
}

.altair-hero-slider .swiper-button-prev,
.altair-hero-slider .swiper-button-next {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.altair-hero-slider:hover .swiper-button-prev,
.altair-hero-slider:hover .swiper-button-next {
	opacity: 1;
	visibility: visible;
}

/* ===================================
   セクション共通
   =================================== */

.section-wrap {
	padding: 0;
}

/* ===================================
   ニュース一覧
   =================================== */

.news-archive {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 16px 48px;
}

.news-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.news-list__item {
	border-bottom: 1px solid #e5e5e5;
}

.news-list__link {
	display: block;
	padding: 24px 0;
	text-decoration: none;
	color: inherit;
}

.news-list__link:hover .news-list__title {
	text-decoration: underline;
}

.news-list__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.news-list__date {
	font-size: 0.8125rem;
	color: #888;
	letter-spacing: 0.03em;
}

.news-list__cat {
	font-size: 0.75rem;
	color: #fff;
	background: #16171a;
	padding: 2px 8px;
	letter-spacing: 0.03em;
}

.news-list__title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.5;
}

.news-list__excerpt {
	font-size: 0.875rem;
	color: #555;
	margin: 0;
	line-height: 1.7;
}

.news-archive__empty {
	padding: 24px 0;
	color: #888;
}

/* ニュース一覧ページネーション */
.news-pagination {
	display: flex;
	justify-content: center;
	gap: 4px;
	padding: 32px 16px;
}

.news-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #ddd;
	text-decoration: none;
	font-size: 0.875rem;
	color: #333;
}

.news-pagination .page-numbers.current {
	background: #16171a;
	color: #fff;
	border-color: #16171a;
}

.top-h3 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 16px 16px;
}

.top-text {
	font-size: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.227), 1.125rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin: 0 16px;
	line-height: 1.8;
}

/* ===================================
   記事一覧 (Post Cards)
   =================================== */

.post-card-container {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin: 0 16px;
}

.post-card {
	width: calc(25% - 20px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.3s ease-in-out;
}

.post-card:hover {
	transform: translateY(-5px);
}

.post-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.post-card-image {
	width: 100%;
	height: 200px;
	background-size: cover;
	background-position: center;
}

.post-card-content {
	padding: 16px;
}

.post-card-title {
	font-size: 18px;
	font-weight: bold;
	margin: 0 0 8px;
}

.post-card-excerpt {
	font-size: 14px;
	color: #555;
	margin: 0 0 12px;
}

.post-card-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #777;
	font-weight: bold;
}

/* ===================================
   サービス 4枚カラム
   =================================== */

.top-column {
	margin: 0 16px;
}

.wp-block-columns {
	display: flex;
	gap: 0;
	flex-wrap: wrap;
	align-items: stretch;
}

.wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}

.wp-block-cover {
	position: relative;
	overflow: hidden;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-block-cover__background {
	position: absolute;
	inset: 0;
	background-color: #000;
	opacity: 0.5;
	z-index: 1;
}

.wp-block-cover__image-background {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	color: #fff;
	text-align: center;
	padding: 16px;
}

.wp-block-cover__inner-container p {
	margin: 0;
	font-size: 1.875rem;
	font-weight: 400;
}

/* ===================================
   取扱車両 / 取扱ブランド
   =================================== */

.brands-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	padding: 0 1%;
	background: #fff;
}

.brand-card {
	padding: 12px;
}

.brand-card__header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.brand-card__logo {
	width: 38px;
	height: 38px;
	object-fit: contain;
	flex-shrink: 0;
}

.brand-card__name {
	font-size: clamp(16px, 1.018rem + ((1vw - 3.2px) * 0.989), 25px);
	font-weight: 700;
	font-style: normal;
	margin: 0;
}

.brand-card__name a {
	text-decoration: none;
	color: inherit;
}

.brand-card__image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.brand-card__desc {
	font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.341), 17px);
	margin: 8px 0 0;
}

/* ===================================
   Single Post
   =================================== */

.wp-block-post-featured-image img {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
}

.article-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

.article-meta .wp-block-post-terms a {
	color: #9DFF20;
	font-weight: 600;
	text-decoration: none;
}

.article-meta .wp-block-post-date {
	color: #666;
}

.back-to-news {
	margin-bottom: 2rem;
}

.back-to-news a {
	display: inline-block;
	color: #fff;
	background: #16171a;
	border: 1px solid #444;
	padding: 0.5rem 1.25rem;
	border-radius: 3px;
	text-decoration: none;
	font-size: 0.875rem;
	transition: background 0.2s;
}

.back-to-news a:hover {
	background: #333;
}

.wp-block-post-navigation-link a {
	color: inherit;
	text-decoration: none;
	font-size: 0.9rem;
}

.wp-block-post-navigation-link a:hover {
	text-decoration: underline;
}

/* ===================================
   Footer
   =================================== */

footer.wp-block-template-part {
	background-color: #16171a;
}

.site-footer {
	color: #fff;
	padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.8rem, 1.8rem + ((1vw - 0.48rem) * 2.885), 3rem);
}

.site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	text-align: center;
}

.site-footer__logo img {
	max-width: 220px;
	height: auto;
}

.site-footer__nav {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
	justify-content: center;
}

.site-footer__nav a {
	color: #aaa;
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.2s;
}

.site-footer__nav a:hover {
	color: #fff;
}

.site-footer__copy {
	margin: 0;
	font-size: 0.8rem;
	color: #666;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1024px) {
	.post-card {
		width: calc(50% - 20px);
	}

	.brands-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.site-header__logo img {
		width: 240px;
		height: 37px;
	}
}

@media (max-width: 781px) {
	.wp-block-columns {
		flex-direction: column;
	}

	.top-column > .wp-block-columns {
		flex-direction: row;
	}
}

@media (max-width: 600px) {
	.post-card {
		width: 100%;
	}

	.brands-grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-header__nav {
		display: none;
	}

	.nav-toggle {
		display: block;
	}

	.site-header.nav-open .site-header__nav {
		display: flex;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: #000;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		z-index: 999;
	}

	.site-header.nav-open .nav-menu {
		flex-direction: column;
		gap: 2rem;
		font-size: 1.25rem;
	}

	.site-header__logo img {
		width: 200px;
		height: auto;
	}

	.altair-hero-slider .slide-inner {
		aspect-ratio: 16 / 9;
	}

	.altair-hero-slider .slide-content {
		padding: 12px 20px;
	}

	.altair-hero-slider .slide-content-title {
		font-size: 20px;
	}

	.altair-hero-slider .slide-content-subtitle {
		font-size: 14px;
	}
}
