/*--------------------------------------------------
	路面電車ページ
--------------------------------------------------*/

/* ===== 路面電車案内ラップ ===== */

.page-tram .tram-guide-wrap {
	background: var(--color-white);
}
.page-tram .tram-guide__inner {
	margin-bottom: 100px;
}
.page-tram .tram-guide__map-body {
	margin-top: 80px;
	text-align: center;
	position: relative;
}
.page-tram .tram-guide__map-deco {
	display: none;
	position: absolute;
	left: 20px;
	bottom: 0;
	width: 180px;
	height: auto;
}
.page-tram .tram-guide__map-link {
	display: inline-flex;
	align-items: center;
	position: relative;
	max-width: 300px;
	min-width: 100%;
	padding: 12px 8px 12px 1.2em;
	border: 1px solid var(--color-black);
	border-radius: var(--radius-full);
	background: var(--color-black);
	color: var(--color-white);
	line-height: 1.4;
	text-decoration: none;
	transition: opacity 0.25s;
}
.page-tram .tram-guide__map-link::after {
	content: '';
	display: block;
	flex-shrink: 0;
	position: absolute;
	top: calc(50% - 9px);
	right: 16px;
	width: 18px;
	height: 18px;
	background: url(../images/icon_blank_wh.svg) no-repeat center center / contain;
}
.page-tram .tram-guide__map-link:hover {
	opacity: 0.85;
}

/* ===== お得情報 ===== */

.page-tram .tram-info {
	padding: 0 var(--container-padding) 110px;
}
.page-tram .tram-info__inner {
	max-width: var(--max-content-width);
	margin: 0 auto;
}
.page-tram .tram-info__title {
	font-size: clamp(1.25rem, 1.25rem + 0.75vw, 2rem);
	font-weight: 700;
	text-align: center;
	margin-bottom: 40px;
}
.page-tram .tram-info__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
}
.page-tram .tram-info__item {
	display: flex;
	flex-direction: column;
}
.page-tram .tram-info__image {
	border-radius: 12px;
	overflow: hidden;
}
.page-tram .tram-info__image img {
	width: 100%;
	height: auto;
	display: block;
}
.page-tram .tram-info__body {
	padding-top: 16px;
}
.page-tram .tram-info__name {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 8px;
}
.page-tram .tram-info__text {
	font-size: 0.875rem;
	line-height: 1.8;
	margin: 0 0 8px;
}
.page-tram .tram-info__sub-title {
	font-size: 0.875rem;
	font-weight: 700;
	margin: 12px 0 4px;
}
.page-tram .tram-info__sub-text {
	font-size: 0.8125rem;
	line-height: 1.8;
	margin: 0 0 8px;
}
.page-tram .tram-info__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--color-black);
	text-decoration: none;
	margin-top: auto;
	justify-content: flex-end;
	width: 100%;
}
.page-tram .tram-info__link::after {
	content: '';
	background: url(../images/icon_next.svg) no-repeat center center / contain;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	font-size: 0.875rem;
	color: var(--gray-400);
}
.page-tram .tram-info__link--external::after {
	content: '';
	background: url(../images/icon_blank_gr.svg) no-repeat center center / contain;
}
.page-tram .tram-info__link:hover {
	opacity: 0.7;
}

/* ===== ギャラリー ===== */

.page-tram .tram-gallery {
	background: #d4edda;
	padding: 48px 0 56px;
	margin-bottom: 0;
	overflow: hidden;
}
.page-tram .tram-gallery::before,
.page-tram .tram-gallery::after {
	display: none;
}
.page-tram .tram-gallery .tateyama-gallery__title {
	color: var(--color-white);
	font-family: var(--font-montserrat);
	font-size: clamp(2rem, 1.5rem + 3vw, 4rem);
	font-weight: 700;
	text-align: center;
	margin-bottom: 24px;
}
.page-tram .tram-gallery .tateyama-gallery__slider {
	max-width: none;
	overflow: visible;
}
.page-tram .tram-gallery .tateyama-gallery__slide {
	width: auto;
	max-width: 516px;
}
.page-tram .tram-gallery .tateyama-gallery__figure {
	border-radius: 24px;
	overflow: hidden;
}
.page-tram .tram-gallery .tateyama-gallery__figure img {
	max-width: 516px;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 24px;
}
.page-tram .tram-gallery .tateyama-gallery__figure figcaption {
	font-size: 0.8125rem;
	color: var(--gray-600);
	margin-top: 8px;
	text-align: center;
}

/* ===== 路面電車の話 ===== */

.page-tram .tram-about {
	margin-top: 80px;
	padding: 0 var(--container-padding);
}
.page-tram .tram-about__inner {
	max-width: var(--max-content-width);
	margin: 0 auto;
}
.page-tram .tram-about__heading {
	font-size: clamp(1.25rem, 1.25rem + 0.75vw, 2rem);
	font-weight: 700;
	text-align: center;
	padding: 20px 0;
	margin-bottom: 40px;
	background: var(--gray-100);
	border-radius: 100px;
}
.page-tram .tram-about__main-title {
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
	font-weight: 700;
	text-align: center;
	margin-bottom: 40px;
}
.page-tram .tram-about__section {
	margin-bottom: 80px;
}
.page-tram .tram-about__section-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 20px;
}
.page-tram .tram-about__section-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	border: none;
	padding: 0;
	position: relative;
	z-index: 1;
}
.page-tram .tram-about__section-text {
	border: 4px dashed var(--gray-300);
	border-radius: 16px;
	padding: 24px;
	background: var(--color-white);
	max-width: 687px;
	position: relative;
	z-index: 2;
}
.page-tram .tram-about__section-text p {
	font-size: 0.875rem;
	line-height: 2;
	margin: 0 0 12px;
}
.page-tram .tram-about__section-text p:last-child {
	margin-bottom: 0;
}
.page-tram .tram-about__section-image {
	display: none;
	text-align: center;
	position: relative;
}
.page-tram .tram-about__section-image::before {
	content: '';
	position: absolute;
	width: 194px;
	height: 194px;
	background: #E7E7E7;
	border-radius: 50%;
	z-index: 0;
}
.page-tram .tram-about__section:nth-of-type(1) .tram-about__section-image::before {
	left: 50%;
	top: 50%;
	transform: translate(-100%, -20%);
}
.page-tram .tram-about__section:nth-of-type(2) .tram-about__section-image::before {
	left: 50%;
	top: 50%;
	transform: translate(-25%, -50%);
}
.page-tram .tram-about__section:nth-of-type(3) .tram-about__section-image::before {
	left: 50%;
	top: 50%;
	transform: translate(-80%, -45%);
}
.page-tram .tram-about__section:nth-of-type(4) .tram-about__section-image::before {
	left: 50%;
	top: 50%;
	transform: translate(-10%, -50%);
}
.page-tram .tram-about__section-image img {
	position: relative;
	z-index: 1;
}
.page-tram .tram-about__section-image img {
	max-width: 160px;
	height: auto;
}
.page-tram .tram-about__note {
	margin-top: 40px;
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
.page-tram .tram-about__note p {
	font-size: 0.8125rem;
	line-height: 1.8;
	margin: 0 0 4px;
}

/* ===== 車両紹介 ===== */

.page-tram .tram-vehicles {
	margin-top: 80px;
	padding: 40px var(--container-padding) 60px;
	background: var(--gray-50);
}
.page-tram .tram-vehicles__inner {
	max-width: var(--max-content-width);
	margin: 0 auto;
}
.page-tram .tram-vehicles__title {
	font-size: clamp(1.25rem, 1.25rem + 0.75vw, 2rem);
	font-weight: 700;
	text-align: center;
	margin-bottom: 40px;
}
.page-tram .tram-vehicles__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}
.page-tram .tram-vehicles__item {
	display: flex;
	flex-direction: column;
}
.page-tram .tram-vehicles__image {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
}
.page-tram .tram-vehicles__image img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.page-tram .tram-vehicles__button {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 36px;
	height: 36px;
	border: none;
	background: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.25s;
}
.page-tram .tram-vehicles__button img {
	width: 36px;
	height: 36px;
	display: block;
}
.page-tram .tram-vehicles__button:hover {
	opacity: 0.8;
}
.page-tram .tram-vehicles__name {
	font-size: 0.8125rem;
	font-weight: 700;
	margin: 8px 0 0;
}
.page-tram .page__relation-wrapper .page__relation-list{
	width: 100%;
}
.page-tram .page__relation-wrapper .page__relation-list .page__relation-item{
	width: 100%;
}
.page-tram .page__relation-wrapper .page__relation-list .page__relation-item a{
	max-width: none;
	width: 100%;
}

/* ===== 車両モーダル ===== */

.tram-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tram-modal[aria-hidden="true"] {
	display: none;
}
.tram-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
}
.tram-modal__content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	text-align: center;
}
.tram-modal__image {
	max-width: 100%;
	max-height: 80vh;
	border-radius: 8px;
	object-fit: contain;
}
.tram-modal__caption {
	margin-top: 12px;
	color: var(--color-white);
	font-size: 1rem;
	font-weight: 700;
}
.tram-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: var(--color-white);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

/* ===== デスクトップ（768px〜） ===== */

@media (min-width: 768px) {
	.page-tram .tram-guide__map-deco {
		display: block;
	}
	.page-tram .tram-guide__map-link {
		max-width: none;
		min-width: 25em;
	}
	.page-tram .tram-info__list {
		grid-template-columns: repeat(2, 1fr);
		gap: 58px 76px;
	}

	.page-tram .tram-gallery .tateyama-gallery__slide:nth-child(odd) {
		padding-top: 65px;
	}
	.page-tram .tram-gallery .tateyama-gallery__slide:nth-child(even) {
		padding-bottom: 65px;
	}

	.page-tram .tram-about__section:nth-child(odd) {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
	}
	.page-tram .tram-about__section:nth-child(even) {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}
	.page-tram .tram-about__section-body {
		flex-direction: row;
		align-items: flex-end;
		gap: 24px;
		padding: 0;
	}
	.page-tram .tram-about__section-text {
		flex: 1;
	}
	.page-tram .tram-about__section-image {
		display: block;
	}
	.page-tram .tram-about__section-image img {
		max-width: 200px;
	}

	.page-tram .tram-vehicles__list {
		grid-template-columns: repeat(3, 1fr);
		gap: 32px;
	}
	.page-tram .tram-vehicles__button {
		width: 40px;
		height: 40px;
		right: -4px;
		bottom: -4px;
	}
	.page-tram .tram-vehicles__name {
		font-size: 0.875rem;
		margin-top: 12px;
	}
}

/* ===== リレーションラッパー ===== */

.page-tram .page__relation-wrapper {
	max-width: var(--max-content-width);
	margin: 0 auto;
}
.page-tram .page__relation-wrapper > .page__relation > .page__relation-title {
	position: relative;
	margin: 0 0 24px;
	font-size: clamp(1rem, 0.875rem + 0.5vw, 1.25rem);
	font-weight: 700;
	line-height: 1.4;
	padding-right: 40px;
}
.page-tram .page__relation-wrapper > .page__relation > .page__relation-title::after {
	content: '';
	position: absolute;
	top: calc(50% - 12px);
	right: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--color-black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1 4h5M4 1l3 3-3 3' fill='none' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center center;
}
.page-tram .page__relation-wrapper .page__relation-item a {
	display: block;
	width: 100%;
}
.page-tram .page__relation-wrapper .page__relation-thumbnail {
	position: relative;
	margin: 0;
	border-radius: var(--radius-m);
	overflow: hidden;
	aspect-ratio: 4 / 3;
}
.page-tram .page__relation-wrapper .page__relation-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.page-tram .page__relation-wrapper .page__relation-item .page__relation-title {
	margin-top: 12px;
	font-weight: 700;
	font-size: clamp(0.875rem, 0.839rem + 0.18vw, 1rem);
	line-height: 1.71;
}
.page-tram .page__relation-wrapper .page__relation-item .page__relation-title::after {
	display: none;
}
.page-tram .page__relation-recommend_souvenirs,
.page-tram .page__relation-toyama-central_recommend,
.page-tram .page__relation-toyama-bay_recommend {
	padding: 40px var(--container-padding);
}
.page-tram .page__relation-recommend_souvenirs {
	background: #BAE3F7;
}
.page-tram .page__relation-toyama-central_recommend {
	background: #CFDA5A;
}
.page-tram .page__relation-toyama-bay_recommend {
	background: #CFDA5A;
}

@media (min-width: 768px) {
	.page-tram .page__relation-recommend_souvenirs,
	.page-tram .page__relation-toyama-central_recommend,
	.page-tram .page__relation-toyama-bay_recommend {
		border-radius: 0;
	}
	.page-tram .page__relation-wrapper {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 132px;
	}
}

.page-tram .news-list__no-results {
	padding: 40px var(--container-padding);
	text-align: center;
}
.page-tram .news-list__no-results-text {
	margin: 0;
	font-size: 0.875rem;
	color: var(--gray-500);
}

@media (min-width: 1024px) {
	.page-tram .news-section .section__header {
		max-width: var(--max-content-width);
		margin-right: auto;
		margin-left: auto;
		margin-bottom: 60px;
		display: flex;
	}
}
