/**
 * Blog, after Figma's "Blog" (887:8933) and "Blog Post" (887:9740): the posts
 * page /blog/ (Elementor archive template "Blog", cards from [tgbp_blog]) and
 * the posts (template "Single Post": date, title, photo, the post's text with
 * "Share it" next to it, and [tgbp_related_posts] under it). Figma has no
 * tablet or phone frames for them; those sizes follow the archives and the
 * home page.
 *
 * The kit styles p (bottom margin), a (orange) and h1/h2 (Sofia Sans,
 * uppercase) with .elementor-kit-6 in front, so rules for those tags here
 * have at least two classes.
 *
 * Loaded on every front-end request, including the Elementor preview.
 */

/* --- Cards (the blog and "Περισσότερα blog posts") ---------------------- */

/* Three columns; the newest post on the blog's first page takes two of them
   (840px = two 405px cards and the 30px between them). */
.tgbp-blog__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 72px 30px;
}

.tgbp-blog-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.tgbp-blog-card--featured {
	grid-column: span 2;
}

.tgbp-blog-card .tgbp-blog-card__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 405 / 307;
	background: #f2f4f7;
}

.tgbp-blog-card--featured .tgbp-blog-card__image {
	aspect-ratio: 840 / 529;
}

.tgbp-blog-card .tgbp-blog-card__image img,
.tgbp-blog-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.tgbp-blog-card:hover .tgbp-blog-card__image img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.tgbp-blog-card .tgbp-blog-card__image img {
		transition: none;
	}
}

.tgbp-blog-card .tgbp-blog-card__title {
	margin: 12px 0 0;
	color: #000;
	font-family: "Roboto", sans-serif;
	font-size: 28px;
	font-weight: 600;
	line-height: 38px;
	letter-spacing: 0;
	text-transform: none;
}

.tgbp-blog-card--featured .tgbp-blog-card__title {
	max-width: 723px;
	margin-top: 16px;
	font-size: 38px;
	line-height: 46px;
	letter-spacing: -1.14px;
}

.tgbp-blog-card .tgbp-blog-card__title a {
	color: inherit;
	text-decoration: none;
}

/* No underline on hover: the photo zooms in. */
.tgbp-blog-card .tgbp-blog-card__title a:hover {
	color: inherit;
	text-decoration: none;
}

.tgbp-blog-card .tgbp-blog-card__excerpt {
	max-width: 723px;
	margin: 9px 0 0;
	color: #000;
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 24px;
}

/* Date and "Περισσότερα", 32px under the title (or the excerpt). */
.tgbp-blog-card__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
	color: #5b5b5b;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	line-height: 18px;
}

.tgbp-blog-card .tgbp-blog-card__more {
	color: #5b5b5b;
	text-decoration: underline;
	text-underline-position: from-font;
}

.tgbp-blog-card .tgbp-blog-card__more:hover {
	color: #000;
}

/* Tablets: two columns, the newest post across both. Phones: one. */
@media (max-width: 1024px) {
	.tgbp-blog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 56px 24px;
	}
}

@media (max-width: 767px) {
	.tgbp-blog__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.tgbp-blog-card--featured {
		grid-column: auto;
	}

	.tgbp-blog-card--featured .tgbp-blog-card__image {
		aspect-ratio: 405 / 307;
	}

	.tgbp-blog-card .tgbp-blog-card__title,
	.tgbp-blog-card--featured .tgbp-blog-card__title {
		font-size: 24px;
		line-height: 32px;
		letter-spacing: 0;
	}

	.tgbp-blog-card__meta {
		margin-top: 24px;
	}
}

/* --- The blog page ------------------------------------------------------ */

/* "BLOG" 46px under the breadcrumb, the cards 45px under it. Elementor
   zeroes widgets' bottom margins in containers with (0,3,0). */
.tgbp-blog.e-con {
	padding-top: 36px;
	padding-bottom: 120px;
}

.tgbp-blog .elementor-widget.tgbp-blog__title {
	margin-bottom: 45px;
}

@media (max-width: 767px) {
	.tgbp-blog.e-con {
		padding-top: 24px;
		padding-bottom: 80px;
	}

	.tgbp-blog .elementor-widget.tgbp-blog__title {
		margin-bottom: 32px;
	}
}

.tgbp-blog__empty {
	font-size: 19px;
	line-height: 26px;
}

/* Pagination, as on the archives (archive.css): "Προηγούμενη" on the left,
   greyed out on the first page, the pages in the middle with the current one
   in a black circle, "Επόμενη" on the right, under a grey line. */
.tgbp-blog__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px;
	margin-top: 72px;
	padding-top: 20px;
	border-top: 1px solid #d0d5dd;
}

.tgbp-blog__pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border-radius: 8px;
	color: #000;
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 24px;
	text-decoration: none;
	transition: background-color 0.15s;
}

.tgbp-blog__pagination a.page-numbers:not(.prev, .next):hover {
	background: #f2f4f7;
	color: #000;
}

.tgbp-blog__pagination .page-numbers.current {
	border-radius: 20px;
	background: #000;
	color: #fff;
}

.tgbp-blog__pagination .page-numbers.dots {
	color: #475467;
	font-family: "Roboto Mono", monospace;
	font-size: 16px;
}

.tgbp-blog__pagination .prev,
.tgbp-blog__pagination .next {
	flex: 1 0 0;
	gap: 6px;
	min-width: max-content;
	padding: 0;
	white-space: nowrap;
}

.tgbp-blog__pagination .prev {
	justify-content: flex-start;
}

.tgbp-blog__pagination .next {
	justify-content: flex-end;
}

.tgbp-blog__pagination .prev::before,
.tgbp-blog__pagination .next::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("../img/archive/arrow-right.svg") center / 20px no-repeat;
	mask: url("../img/archive/arrow-right.svg") center / 20px no-repeat;
}

.tgbp-blog__pagination .prev::before {
	transform: scaleX(-1);
}

.tgbp-blog__pagination a.prev:hover,
.tgbp-blog__pagination a.next:hover {
	color: #000;
	text-decoration: underline;
}

.tgbp-blog__pagination .is-disabled {
	color: #98a2b3;
}

/* Phones: arrows without their text, smaller pages. */
@media (max-width: 767px) {
	.tgbp-blog__pagination {
		gap: 0;
		margin-top: 48px;
	}

	.tgbp-blog__pagination .page-numbers {
		min-width: 32px;
		height: 32px;
		padding: 0 4px;
		font-size: 15px;
	}

	.tgbp-blog__pagination .page-numbers.current {
		border-radius: 16px;
	}

	.tgbp-blog__pagination .prev,
	.tgbp-blog__pagination .next {
		min-width: 20px;
		font-size: 0;
	}
}

/* --- The post ----------------------------------------------------------- */

/* Date, 32px down to the title (1164px wide at most), 56 down to the photo,
   56 down to the text, 89 down to "Περισσότερα blog posts". */
.tgbp-post.e-con {
	padding-top: 53px;
	padding-bottom: 120px;
}

.tgbp-post-date {
	color: #5b5b5b;
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 24px;
	text-align: center;
}

.elementor-element.tgbp-post__title {
	width: 100%;
	max-width: 1164px;
	margin: 32px auto 0;
	overflow-wrap: break-word;
}

.elementor-element.tgbp-post__hero {
	width: 100%;
	margin-top: 56px;
}

.elementor-widget.tgbp-post__hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1278 / 664;
	object-fit: cover;
}

/* The text in the middle 960px, "Share it" in the room on its left, where it
   stays in view while the text scrolls by (lower while the header shows,
   header.css). */
.tgbp-post__body.e-con {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 960px) minmax(0, 1fr);
	align-items: start;
	width: 100%;
	margin-top: 56px;
}

.elementor-element.tgbp-post__share {
	grid-area: 1 / 1;
	position: sticky;
	top: calc(24px + var(--tgbp-header-offset, 0px));
	width: auto;
	transition: top 0.3s ease;
}

.elementor-element.tgbp-post__content {
	grid-area: 1 / 2;
	min-width: 0;
}

.elementor-element.tgbp-post__related {
	width: 100%;
	margin-top: 89px;
}

/* No other posts yet: no gap for the empty widget. */
.elementor-element.tgbp-post__related:not(:has(.tgbp-related)) {
	display: none;
}

/* Tablets and phones (no room on the left): "Share it" above the text. */
@media (max-width: 1200px) {
	.tgbp-post__body.e-con {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.elementor-element.tgbp-post__share {
		grid-area: auto;
		position: static;
		justify-self: center;
	}

	.elementor-element.tgbp-post__content {
		grid-area: auto;
	}
}

@media (max-width: 767px) {
	.tgbp-post.e-con {
		padding-top: 24px;
		padding-bottom: 80px;
	}

	.elementor-element.tgbp-post__title {
		margin-top: 16px;
	}

	.elementor-element.tgbp-post__hero,
	.tgbp-post__body.e-con {
		margin-top: 32px;
	}

	.tgbp-post__body.e-con {
		gap: 32px;
	}

	/* "Share it" after the text, kept at the bottom left of the screen while
	   the text scrolls by, until it rests below it. */
	.elementor-element.tgbp-post__share {
		grid-row: 2;
		position: sticky;
		bottom: calc(20px + env(safe-area-inset-bottom, 0px));
		z-index: 1;
		justify-self: start;
	}

	.elementor-widget.tgbp-post__hero img {
		aspect-ratio: 4 / 3;
	}

	.elementor-element.tgbp-post__related {
		margin-top: 64px;
	}
}

/* "Share it": black pill, Roboto Mono, with Figma's share icon. Classes
   doubled to outrank the kit's and Hello's button styles. */
.tgbp-share.tgbp-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 15px 19px 15px 21px;
	border: 1px solid #000;
	border-radius: 50px;
	background: #000;
	box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
	color: #fff;
	font-family: "Roboto Mono", monospace;
	font-size: 16px;
	font-weight: 700;
	line-height: 22px;
	letter-spacing: 0.32px;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

/* Orange with black text and icon, like every button (css/buttons.css). */
.tgbp-share.tgbp-share:is(:hover, :focus, :active) {
	border-color: #faa92c;
	background: #faa92c;
	color: #000;
}

.tgbp-share:is(:hover, :focus, :active) .tgbp-share__icon {
	filter: invert(1);
}

.tgbp-share.tgbp-share:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.tgbp-share__icon {
	flex: none;
	width: 20px;
	height: 20px;
}

/* Read out when the link was copied (custom.js); the button says it too. */
.tgbp-share__status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The post's text: paragraphs and headings 712px wide in the middle of the
   960px column, quotes and photos across all of it. 16px between
   paragraphs, 24 around headings, 48 around quotes and photos. */
.tgbp-post__content .elementor-widget-container {
	color: #000;
	font-family: "Roboto", sans-serif;
	font-size: 19px;
	line-height: 26px;
}

.tgbp-post__content .elementor-widget-container > * {
	max-width: 712px;
	margin: 0 auto;
}

.tgbp-post__content .elementor-widget-container > * + * {
	margin-top: 16px;
}

.tgbp-post__content .elementor-widget-container > :is(h2, h3, h4),
.tgbp-post__content .elementor-widget-container > :is(h2, h3, h4) + * {
	margin-top: 24px;
}

.tgbp-post__content .elementor-widget-container > :is(blockquote, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery),
.tgbp-post__content .elementor-widget-container > :is(blockquote, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery) + * {
	margin-top: 48px;
}

.tgbp-post__content .elementor-widget-container > :first-child {
	margin-top: 0;
}

.tgbp-post__content .elementor-widget-container > :is(blockquote, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery) {
	max-width: 960px;
}

.tgbp-post__content .elementor-widget-container p {
	margin-bottom: 0;
}

.tgbp-post__content .elementor-widget-container a {
	color: #ed6400;
	text-decoration: underline;
	text-underline-position: from-font;
}

.tgbp-post__content .elementor-widget-container a:hover {
	color: #000;
}

.tgbp-post__content .elementor-widget-container > h2 {
	color: #222;
	font-family: "Roboto", sans-serif;
	font-size: 38px;
	font-weight: 600;
	line-height: 46px;
	letter-spacing: -1.14px;
	text-transform: none;
}

.tgbp-post__content .elementor-widget-container > :is(h3, h4) {
	color: #222;
	font-family: "Roboto", sans-serif;
	font-size: 28px;
	font-weight: 600;
	line-height: 38px;
	text-transform: none;
}

.tgbp-post__content .elementor-widget-container > blockquote {
	padding: 0;
	border: 0;
	color: #000;
	font-family: "Roboto", sans-serif;
	font-size: 48px;
	font-style: normal;
	font-weight: 600;
	line-height: 60px;
	letter-spacing: -1.44px;
}

.tgbp-post__content .elementor-widget-container > blockquote p::before {
	content: "“";
}

.tgbp-post__content .elementor-widget-container > blockquote p::after {
	content: "”";
}

.tgbp-post__content .elementor-widget-container > blockquote cite {
	display: block;
	margin-top: 16px;
	color: #5b5b5b;
	font-size: 17px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: 0;
}

.tgbp-post__content .elementor-widget-container :is(figure, .wp-block-image) img {
	display: block;
	width: 100%;
	height: auto;
}

.tgbp-post__content .elementor-widget-container figcaption {
	margin: 12px 0 0;
	color: #5b5b5b;
	font-size: 15px;
	line-height: 23px;
	text-align: left;
}

.tgbp-post__content .elementor-widget-container > :is(ul, ol) {
	padding-left: 24px;
}

@media (max-width: 1024px) {
	.tgbp-post__content .elementor-widget-container > blockquote {
		font-size: 40px;
		line-height: 50px;
		letter-spacing: -1.2px;
	}
}

@media (max-width: 767px) {
	.tgbp-post__content .elementor-widget-container > :is(blockquote, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery),
	.tgbp-post__content .elementor-widget-container > :is(blockquote, figure, .wp-block-image, .wp-block-embed, .wp-block-gallery) + * {
		margin-top: 32px;
	}

	.tgbp-post__content .elementor-widget-container > h2 {
		font-size: 28px;
		line-height: 36px;
		letter-spacing: -0.84px;
	}

	.tgbp-post__content .elementor-widget-container > :is(h3, h4) {
		font-size: 24px;
		line-height: 32px;
	}

	.tgbp-post__content .elementor-widget-container > blockquote {
		font-size: 28px;
		line-height: 36px;
		letter-spacing: -0.84px;
	}
}

/* "Περισσότερα blog posts": under a grey line, the kit's h2 (Sofia Sans
   48/52, uppercase), 24px above the cards. On tablets two cards, on phones
   all three in a column. */
.tgbp-related {
	padding-top: 24px;
	border-top: 1px solid #5b5b5b;
}

.tgbp-related .tgbp-related__title {
	margin: 0 0 24px;
	color: #000;
}

@media (min-width: 768px) and (max-width: 1024px) {
	.tgbp-related .tgbp-blog-card:nth-child(3) {
		display: none;
	}
}

@media (max-width: 767px) {
	.tgbp-related .tgbp-related__title {
		font-size: 36px;
		line-height: 40px;
	}
}
