/*
Theme Name: d-pass
Description: Works styles
Version: 1.0.0
*/

/* ------------------------------------------------------------------
   Works Archive
   ------------------------------------------------------------------ */

.works-archive {
	width: 100%;
	padding-inline: clamp(1rem, 4vw, 2rem);
	padding-block: clamp(2rem, 5vw, 4rem);
}

.works-archive__inner {
	width: 100%;
	max-width: 66.875rem;
	margin-inline: auto;
}

/* Category filter
   ------------------------------------------------------------------ */

.works-archive__filter {
	margin-block-end: 2.25rem;
}

.works-archive__filter-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.works-archive__filter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0.25rem 1rem;
	border-radius: 999rem;
	background-color: #f0f0f0;
	color: #1e1e1e;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008rem;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.works-archive__filter-btn.is-active,
.works-archive__filter-btn:hover {
	background-color: #484848;
	color: #fff;
}

/* Article grid
   ------------------------------------------------------------------ */

.works-archive__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
	padding-inline: 0;
}

/* Card
   ------------------------------------------------------------------ */

.works-card {
	background-color: #fff;
	box-shadow: 0 0.25rem 0.125rem rgba(0, 0, 0, 0.25);
	box-shadow: 0px 5px 7px #ededed;
	border-radius: 0.3rem;
	overflow: hidden;
}

.works-card__link {
	display: flex;
	flex-direction: column;
	gap: 1.3rem;
	height: 100%;
	padding-block-end: 1.75rem;
	color: inherit;
	text-decoration: none;
}

.works-card__thumb {
	width: 100%;
	aspect-ratio: 335 / 228;
	overflow: hidden;
}

.works-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.works-card__img--placeholder {
    background: url(/wp-content/uploads/2024/02/icon-512x512-1.png);
    background-size: cover;
    background-position: center;
    background-size: 102%;
}

.works-card__body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-inline: 0.875rem;
}

/* Meta row
   ------------------------------------------------------------------ */

.works-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.875rem;
	width: 100%;
}

.works-card__category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.5rem;
	padding: 0.3rem 1rem;
	border-radius: 999rem;
	background-color: #f0f0f0;
	color: #1e1e1e;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008rem;
	white-space: nowrap;
}

.works-card__date {
	flex-shrink: 0;
	color: #007bff;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008rem;
	text-align: right;
}

/* Title
   ------------------------------------------------------------------ */

.works-card__title {
	color: #1e1e1e;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.011rem;
	word-break: break-word;
	padding: 0;
	border: 0;
}

/* Tags
   ------------------------------------------------------------------ */

.works-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.works-card__tag {
	display: block;
	align-items: center;
	justify-content: center;
	/* min-height: 1rem; */
	padding: 0.1rem 0.7rem;
	border: 0.0625rem solid #1e1e1e;
	border-radius: 999rem;
	background-color: #fff;
	color: #1e1e1e;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008rem;
	white-space: nowrap;
}

/* Empty state & pagination
   ------------------------------------------------------------------ */

.works-archive__empty {
	color: #1e1e1e;
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
}

.works-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-block-start: 2.25rem;
}

/* .works-archive .nav-links a,
.works-archive .nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	min-height: 2rem;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	color: #1e1e1e;
	font-size: 0.875rem;
	text-decoration: none;
} */

/* .works-archive .nav-links .current {
	background-color: #3b9cf5;
	color: #fff;
} */

/* Responsive
   ------------------------------------------------------------------ */

@media (max-width: 64rem) {
	.works-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 40rem) {
	.works-archive__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.works-archive__filter-list {
		gap: 0.5rem;
	}

	.works-archive__filter-btn {
		font-size: 0.8125rem;
		padding-inline: 0.75rem;
	}
}

/* ------------------------------------------------------------------
   Works Single
   ------------------------------------------------------------------ */

.works-single {
	width: 100%;
	padding-inline: 0;
	padding-block: clamp(2rem, 5vw, 4rem);
	background-color: #fff;
}

.works-single__inner {
	display: flex;
	flex-direction: column;
	gap: 3rem;
	width: 100%;
	max-width: 56.9375rem;
	margin-inline: auto;
}

.works-single__article {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

/* Hero
   ------------------------------------------------------------------ */

.works-single__hero {
	display: flex;
	gap: 2.25rem;
	align-items: flex-start;
}

.works-single__hero-media {
	flex: 0 1 52%;
	min-width: 0;
}

.works-single__hero-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 476 / 269;
	object-fit: cover;
	border-radius: 0.5rem;
}

.works-single__hero-img--placeholder {
	background-color: #e8e8e8;
}

.works-single__hero-body {
	display: flex;
	flex: 1 1 48%;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

.works-single__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.875rem;
	width: 100%;
}

.works-single__category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.125rem;
	padding: 0.3125rem 1rem;
	border-radius: 999rem;
	background-color: #f0f0f0;
	color: #1e1e1e;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008rem;
}

.works-single__date {
	flex-shrink: 0;
	color: #1e1e1e;
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.012rem;
	text-align: right;
}

#main-container .works-single__title {
	color: #000;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.667;
	word-break: break-word;
}

.works-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.works-single__tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.9375rem;
	padding: 0.0625rem 0.8125rem;
	border: 0.0625rem solid #1e1e1e;
	border-radius: 1.28125rem;
	background-color: #fff;
	color: #1e1e1e;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
	pointer-events: none;
}

.works-single__tag:hover {
	background-color: #3b9cf5;
	border-color: #3b9cf5;
	color: #fff;
}

/* Content
   ------------------------------------------------------------------ */

.works-single__content {
	color: #212529;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.8;
	letter-spacing: 0.1rem;
	word-break: break-word;
}

.works-single__content > *:first-child {
	margin-block-start: 0;
}

.works-single__content > *:last-child {
	margin-block-end: 0;
}

.works-single__content p {
	margin-block: 1.5rem;
}

.works-single__content h2,
.works-single__content h3 {
	margin-block: 2rem 1.5rem;
	padding: 0.46875rem 0.585rem 0.46875rem 0.86875rem;
	border-inline-start: 0.284375rem solid #2f9cff;
	background-color: #f4f4f4;
	color: #494949;
	font-size: 1.17rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: normal;
}

.works-single__content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-inline: auto;
	margin-block: 2rem;
}

.works-single__content .aligncenter,
.works-single__content .wp-block-image {
	text-align: center;
}

.works-single__content a {
	color: #2f9cff;
	text-decoration: underline;
}

.works-single__content ul,
.works-single__content ol {
	margin-block: 1.5rem;
	padding-inline-start: 1.5rem;
}

/* Related works
   ------------------------------------------------------------------ */

.works-single__related {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.works-single__related-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	text-align: center;
}

.works-single__related-title {
	color: #333;
	font-size: 1.4375rem;
	font-weight: 700;
	line-height: 1.47;
}

.works-single__related-subtitle {
	position: relative;
	padding-block-end: 0.75rem;
	color: #333;
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.47;
}

.works-single__related-subtitle::after {
	content: "";
	display: block;
	width: 4rem;
	height: 0.2rem;
	margin-block-start: 0.575rem;
	margin-inline: auto;
	background-color: #2f9cff;
}

.works-single__related-grid {
	width: 100%;
}

#main-container .works-archive__filter-item,
#main-container .works-card__tag-item {
	margin: 0;
}

.works-card__link {
	transition: .3s;
}

.works-card__link:hover {
	text-decoration: unset;
	opacity: 0.8;
	transition: .3s;
}

.works-archive__filter-btn:hover {
	text-decoration: unset;
}

#main-container .works-single__tag-item {
	margin: 0;
}

.works_btn_back.service__btn {
	text-align: right;
	margin-top: 2rem;
}

/* Responsive
   ------------------------------------------------------------------ */

@media (max-width: 48rem) {
	.works-single__hero {
		flex-direction: column;
	}

	.works-single__hero-media,
	.works-single__hero-body {
		flex-basis: auto;
		width: 100%;
	}

	.works-single__date {
		font-size: 1rem;
	}
	
	.works-archive {
		width: 100%;
		padding-inline: 0;
	}
}

@media (max-width: 40rem) {
	.works-single__content {
		letter-spacing: 0.05rem;
	}

	.works-single__content h2,
	.works-single__content h3 {
		font-size: 1.0625rem;
	}
}
