/*
Theme Name: Kadence OZ Judo
Description: Child theme of Kadence for Okręgowy Związek Judo w Poznaniu.
Template: kadence
Version: 1.0.6
Text Domain: kadence-ozj
*/

/* Header: the round logo next to the association name. */
.site-branding .site-title {
	font-weight: 700;
	line-height: 1.2;
}

/* Main menu bar under the logo: uppercase like the old site. */
.site-bottom-header-wrap .header-navigation .menu > li > a {
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* News list: compact cards, usually without images. */
.loop-entry .entry-header .entry-title {
	font-size: 1.35rem;
	line-height: 1.3;
}
.loop-entry .entry-summary p {
	margin-bottom: 0.5em;
}
.loop-entry .more-link-wrap {
	margin-top: 0.75em;
}
.loop-entry.type-post .entry-content-wrap {
	padding: 1.5rem 1.75rem;
}
.loop-entry {
	border-left: 4px solid var(--global-palette1);
}
@media (max-width: 767px) {
	.loop-entry.type-post .entry-content-wrap {
		padding: 1.1rem 1.1rem;
	}
	.loop-entry .entry-header .entry-title {
		font-size: 1.2rem;
	}
}

/* Attachment file names in excerpts and posts are long unbroken words. */
.entry-summary,
.entry-content {
	overflow-wrap: anywhere;
}

/* Sidebar logos. */
.primary-sidebar .widget_block img,
.primary-sidebar .widget_text img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}

/* Captioned images from the classic editor ([caption] -> div.wp-caption):
   framed like the old theme, with a small muted caption. */
.entry-content .wp-caption {
	box-sizing: border-box;
	max-width: 100%;
	padding: 8px;
	background: var(--global-palette8);
	border: 1px solid var(--global-palette7);
	text-align: center;
}
.entry-content .wp-caption img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}
.entry-content .wp-caption .wp-caption-text {
	margin: 0.4em 0 0.1em;
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--global-palette6);
}
.entry-content .wp-caption.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}
.entry-content .wp-caption.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}
.entry-content .wp-caption.aligncenter {
	margin: 0.5em auto 1em;
}
@media (max-width: 543px) {
	/* On phones a floated caption squeezes the text into a sliver. */
	.entry-content .wp-caption.alignleft,
	.entry-content .wp-caption.alignright {
		float: none;
		margin: 0.5em auto 1em;
	}
}

/* Galeria: one card per gallery page (cover, title, date and photo count). */
.ozj-gallery-index {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25rem;
}
.ozj-gallery-card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	background: var(--global-palette9);
	border: 1px solid var(--global-palette7);
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.15s, transform 0.15s;
}
.ozj-gallery-card:hover,
.ozj-gallery-card:focus-visible {
	box-shadow: 0 6px 18px rgba(27, 38, 49, 0.15);
	transform: translateY(-2px);
}
.ozj-gallery-card img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.ozj-gallery-card-title {
	padding: 0.75rem 0.9rem 0.25rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--global-palette3);
}
.ozj-gallery-card-meta {
	padding: 0 0.9rem 0.85rem;
	font-size: 0.85rem;
	color: var(--global-palette6);
}
.ozj-gallery-back {
	margin-top: 1.5em;
}

/* Tables in results and rankings pages. */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}
.entry-content table td,
.entry-content table th {
	border: 1px solid var(--global-palette7);
	padding: 0.4em 0.6em;
}
/* Old tables carry fixed column widths: scroll them sideways on phones
   instead of cutting them off. */
@media (max-width: 767px) {
	.entry-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		font-size: 0.9em;
	}
	.entry-content table td,
	.entry-content table th {
		overflow-wrap: normal;
	}
}

/* [box] shortcode (Elegant Themes legacy), mostly download links. */
.ozj-box {
	position: relative;
	margin: 0 0 1em;
	padding: 0.75em 1em;
	background: var(--global-palette8);
	border-left: 4px solid var(--global-palette1);
	border-radius: 0 4px 4px 0;
}
.ozj-box > :last-child {
	margin-bottom: 0;
}
.ozj-box-download {
	padding-left: 3em;
}
.ozj-box-download::before {
	content: "";
	position: absolute;
	left: 1em;
	top: 0.95em;
	width: 1.2em;
	height: 1.2em;
	background: var(--global-palette1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0-5-5m5 5 5-5M4 19h16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m0 0-5-5m5 5 5-5M4 19h16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
