<?php
/**
 * Single post styles – Piripiri 40 Graus layout
 */

body.single {
	background: #fff;
}

body.single .site-main {
	padding: 16px 0 32px;
	background: #fff;
}

body.single .site-header {
	box-shadow: none;
	border-bottom: 1px solid #eee;
}

body.single .container.single-layout {
	max-width: 1200px;
	padding: 0 12px;
}

/* Single post layout */
.single-layout {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.single-layout:not(.has-parceiros-sidebar) {
	display: block;
}

.single-article {
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
	border-radius: 0;
	padding: 12px 0 24px;
	box-shadow: none;
}

.single-article .entry-title {
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
	color: #222;
	margin: 0 0 14px;
	text-transform: none;
}

.entry-meta--inline {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
}

.entry-meta-avatar {
	border-radius: 50%;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
}

.entry-meta-line {
	margin: 0;
	font-size: 13px;
	color: #555;
	line-height: 1.4;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.entry-meta-author {
	font-weight: 400;
	color: #444;
}

.entry-meta-sep {
	color: #999;
	font-size: 12px;
	line-height: 1;
}

.entry-meta-date {
	color: #555;
}

.entry-thumbnail {
	margin: 0 0 18px;
	border-radius: 0;
	overflow: hidden;
	line-height: 0;
}

.entry-thumbnail .dn-thumbnail-wrap {
	position: relative;
	display: block;
	line-height: 0;
}

.entry-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

.entry-thumbnail .dn-sponsored-badge {
	top: 10px;
	left: 10px;
	font-size: 10px;
	padding: 4px 8px;
}

.entry-content {
	font-size: 15px;
	line-height: 1.75;
	color: #444;
	text-align: justify;
	hyphens: auto;
	overflow-wrap: break-word;
}

.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content embed {
	max-width: 100%;
}

.entry-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content p {
	margin-bottom: 1em;
}

.entry-content a {
	color: #1a73e8;
}

.post-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #e8e8e8;
}

.post-share-label {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.post-share-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.post-share-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.post-share-link:hover,
.post-share-link:focus {
	color: #fff;
	opacity: 0.9;
	transform: translateY(-1px);
}

.post-share-link svg {
	width: 20px;
	height: 20px;
	display: block;
}

@media (max-width: 575px) {
	.post-share {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.post-share-links {
		gap: 8px;
	}

	.post-share-link {
		width: 38px;
		height: 38px;
	}

	.single-article .entry-title {
		font-size: 1.1rem;
	}

	.parceiros-sidebar-inner {
		--parceiro-logo-size: 92px;
	}
}

.post-share-link--facebook {
	background: #1877f2;
}

.post-share-link--instagram {
	background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.post-share-link--whatsapp {
	background: #25d366;
}

.post-share-link--x {
	background: #000;
}

.post-share-link--copy.is-copied {
	background: #2e7d32;
}

.related-posts {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #e8e8e8;
}

.related-posts-title {
	margin: 0 0 18px;
	font-size: 1.15rem;
	font-weight: 700;
	color: #222;
}

.posts-grid--related {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

.posts-grid--related .post-card-title {
	font-size: 0.9rem;
	-webkit-line-clamp: 3;
	min-height: calc(1.4em * 3);
}

/* Partners on the side of the post */
.parceiros-sidebar {
	flex: 0 0 auto;
	width: auto;
	max-width: none;
	margin: 0;
	padding-top: 16px;
	align-self: flex-start;
}

.parceiros-sidebar-inner {
	--parceiro-sidebar-space: 8px;
	--parceiro-logo-size: 100px;
	box-sizing: border-box;
	width: calc(var(--parceiro-logo-size) + (var(--parceiro-sidebar-space) * 2));
	background: #f3f3f3;
	border-radius: 4px;
	padding: var(--parceiro-sidebar-space);
	position: sticky;
	top: calc(var(--header-bar-height, 82px) + 8px);
}

.parceiros-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--parceiro-sidebar-space);
	width: 100%;
}

.parceiro-item {
	flex: 0 0 auto;
	align-self: stretch;
	background: transparent;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	border: none;
}

.parceiro-item--logo {
	width: 100%;
	max-width: none;
	background: transparent;
}

.parceiro-item:hover {
	transform: none;
	box-shadow: none;
	opacity: 0.92;
}

.parceiros-sidebar .parceiro-link {
	display: block;
	line-height: 0;
	border-radius: 0;
	overflow: visible;
}

.parceiros-sidebar .parceiro-link--logo {
	aspect-ratio: 6 / 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background: transparent;
	padding: 0;
	border-radius: 0;
	overflow: hidden;
}

.parceiros-sidebar .parceiro-logo-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
	border-radius: 4px;
}

.parceiros-sidebar .parceiro-link:not(.parceiro-link--logo) {
	aspect-ratio: 4 / 1;
}

.parceiros-sidebar .parceiro-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	border-radius: 0;
}

.parceiros-list-title,
.parceiros-sidebar .widget-title {
	display: none;
}

.parceiros-sidebar .parceiro-item--widget {
	background: transparent;
	border: none;
	border-radius: 3px;
	overflow: hidden;
}

.parceiros-sidebar .widget {
	margin: 0;
}

.parceiros-sidebar .widget:last-child {
	margin-bottom: 0;
}

/* Tablet */
@media (min-width: 480px) {
	.posts-grid--related {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 576px) {
	.single-article .entry-title {
		font-size: 1.35rem;
	}

	body.single .container.single-layout {
		padding: 0 16px;
	}

	.single-layout {
		gap: 16px;
	}

	.parceiros-sidebar-inner {
		--parceiro-logo-size: 116px;
	}
}

/* Desktop */
@media (min-width: 768px) {
	body.single .container.single-layout {
		padding: 0 20px;
	}

	.single-article {
		padding: 20px 0 32px;
	}

	.single-article .entry-title {
		font-size: 1.65rem;
		margin-bottom: 14px;
	}

	.single-layout {
		gap: 20px;
	}

	.parceiros-sidebar {
		padding-top: 30px;
	}

	.parceiros-sidebar-inner {
		--parceiro-logo-size: 128px;
	}

	.posts-grid--related {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
}

@media (min-width: 992px) {
	.single-article .entry-title {
		font-size: 1.85rem;
	}

	.parceiros-sidebar-inner {
		--parceiro-logo-size: 140px;
	}

	.entry-content {
		font-size: 16px;
	}

	.posts-grid--related {
		grid-template-columns: repeat(4, 1fr);
		gap: 16px;
	}

	.posts-grid--related .post-card-title {
		font-size: 0.95rem;
	}
}
