/* =====================================================================
	= NEWS HEADLINE
=====================================================================*/
#news-headline-wrapper {
	position: relative;
	top: 0;
	margin: 0 auto;
}

#news-headline {
	z-index: 20;
	margin: 0 auto;
	padding-top: calc(16px * 2);
	display: flex;
	justify-content: flex-end;
	align-items: flex-start;
	visibility: hidden;
}

.news-headline__list {
	flex: 0 0 608px;
	position: relative;
	line-height: 1;
	padding-bottom: 0.5em;
	border-bottom: var(--border);
	visibility: visible;
	overflow: hidden;
}

.news-headline__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.news-headline__date {
	flex: 0 0 auto;
	color: #999;
}

.news-headline__title {
	flex: 0 1 100%;
	display: block;
	overflow: hidden;
	white-space: nowrap;
}

.news-headline__title.is-overflowing {
	mask-image: linear-gradient(to right, black calc(100% - 2em), transparent 100%);
	-webkit-mask-image: linear-gradient(to right, black calc(100% - 2em), transparent 100%);
}

/*-------------------------------------------------------------------
	NEWS MODAL
-------------------------------------------------------------------*/
.news-modal[hidden] {
	display: none;
}

.news-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
}

.news-modal__text a {
	color: #999;
}
.news-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(25px);
	cursor: pointer;
}

.news-modal__content {
	position: relative;
	z-index: 20;
	width: min(944px, calc(100% - 96px));
	max-height: calc(100vh - 96px);
	margin: 48px auto;
	background: var(--bg-color);
	overflow: auto;
}

.news-modal__inner {
	padding: calc(16px * 2);
}

.news-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	line-height: 1;
}

.news-modal__title {
	margin: 0;
	font-weight: 400;
}

.news-modal__close {
	cursor: pointer;
}

.news-modal__item {
	padding: calc(16px * 2) 0;
	border-bottom: var(--border);
}

.news-modal__item:last-child {
	border-bottom: none;
}

.news-modal__item-inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.news-modal__image {
	flex: 0 0 54.545%;
}

.news-modal__text {
	flex: 0 0 41%;
}

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

.news-modal__date {
	margin-bottom: 1em;
	font-size: var(--micro-txt);
}

.news-modal__item-title {
	margin: 0;
	font-weight: 600;
}

.news-modal__divider {
	margin: 0;
}

.news-modal__excerpt p:first-child {
	margin-top: 0;
}

body.is-news-modal-open {
	overflow: hidden;
}

.news-headline__item--clone {
    display: none;
}


@media (min-width: 961px) {
	#news-headline-wrapper {
		position: absolute;
		top: 0;
		width: 100%;
		margin: 0 auto;
	}

	#news-headline {
		position: absolute;
		top: 0;
		left: 50%;
		transform: translateX(-50%);
	}

	.news-headline__item {
		font-size: var(--small-txt);
	}
	
	.news-headline__item::after {
		flex: 0 0 auto;
		content: '→';
	}

	/* PC フリップアニメーション */
	.news-headline__item.is-leaving {
		animation: flip-out 0.4s ease-in forwards;
		transform-origin: center center;
		transform-style: preserve-3d;
	}

	.news-headline__item.is-entering {
		animation: flip-in 0.4s ease-out forwards;
		transform-origin: center center;
		transform-style: preserve-3d;
	}

	@keyframes flip-out {
		0%   { transform: perspective(9999px) rotateX(0deg); opacity: 1; }
		100% { transform: perspective(9999px) rotateX(90deg); opacity: 0; }
	}

	@keyframes flip-in {
		0%   { transform: perspective(9999px) rotateX(-90deg); opacity: 0; }
		100% { transform: perspective(9999px) rotateX(0deg); opacity: 1; }
	}

}


@media (max-width: 960px) {
	#news-headline {
		position: absolute;
		top: 0;
		right: 0;
		z-index: 20;
		width: 100%;
		margin: 0 auto;
		padding-top: calc(16px * 2);
		display: flex;
		justify-content: flex-end;
		align-items: flex-start;
		visibility: hidden;
	}

    #news-headline {
		display: block;
        overflow: hidden;
		padding-top: 0;
    }

    .news-headline__list {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
		padding: 0.5em 0;
		border: none;
    }

    .news-headline__list:hover {
        animation-play-state: paused;
    }

    .news-headline__item--clone {
        display: contents;
    }
	.news-headline__item {
		margin-right: 2em;
		gap: 0;
		font-size: var(--base-txt);
	}

	.news-headline__item * {
		display: inline-block;
		white-space: nowrap;
	}

	.news-headline__date {
		margin-right: 0.5em;
	}
	
	.news-modal__head {
		border-bottom: none;
	}

	.news-modal__image {
		width: 100%;
	}
}


@media (min-width: 431px) {
	/*-------------------------------------------------------------------
	NEWS MODAL
	-------------------------------------------------------------------*/
	
	.news-modal__head {
		display: flex;
		align-items: flex-start;
		height: calc(16px * 2);
		border-bottom: var(--border);
	}
	
	.news-modal__title {
		font-size: var(--base-txt);
	}
	
	/* PC用クローズボタン */
	.news-modal__close {
		display: block;
		width: 12.69px;
		height: 12.69px;
		background-image: url('/wp/wp-content/themes/tsugumi/img/icon-close_pc.svg');
		background-size: contain;
		background-repeat: no-repeat;
	}

	.news-modal__close:hover {
		background-image: url('/wp/wp-content/themes/tsugumi/img/icon-close_pc-hover.svg');
	}
}

@media (max-width: 430px) {
	
	.news-modal__content {
		width: 100vw;
		max-height: 100vh;
		margin: 0;
		border: 0;
	}

	.news-modal__inner {
		padding-top: calc(16px * 2);
		padding-left: calc(16px * 2);
		padding-right: calc(16px * 2);
		padding-bottom: calc(16px * 2);
	}

	.news-modal__item {
		padding: 4em 0;
	}

	.news-modal__item-inner {
		flex-direction: column;
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.news-modal__date {
		margin-bottom: 0;
		font-size: var(--base-txt);
	}

	.news-modal__item-title {
		line-height: 1.7;
	}
	
	.news-modal__title {
		font-size: var(--large-txt);
	}

	/* mobile用クローズボタン */
	.news-modal__close {
		display: block;
		width: 21px;
		height: 21px;
		background-image: url('/wp/wp-content/themes/tsugumi/img/icon-close.svg');
		background-size: contain;
		background-repeat: no-repeat;
	}

	.news-modal__close:hover {
		background-image: url('/wp/wp-content/themes/tsugumi/img/icon-close.svg');
	}

	.news-modal__inner {
		padding-left: var(--unit);
		padding-right: var(--unit);
		padding-bottom: calc(16px * 2);
	}
}


.news-headline__list,
.news-headline__item,
.news-headline__title {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
