/**
 * Matezex Term Content — category page content + category card grids.
 *
 * Brand palette (Elementor kit): blue #004CFE, black #0A0D0F,
 * grey text #52697A / #859CAD, card background #EDF0F3, border #E0E6EB.
 * Card shape follows the hand-built design: radius 0 32 32 32.
 *
 * @package Matezex_Catalog_Mode
 */

/* =========================================================================
   Term content (hero, intro, blocks)
   ========================================================================= */

.matezex-term-content {
	margin-bottom: 32px;
}

.matezex-term-breadcrumb {
	margin-bottom: 16px;
}

.matezex-term-breadcrumb .matezex-breadcrumb {
	font-size: 14px;
	color: #859cad;
}

.matezex-term-breadcrumb .matezex-breadcrumb a {
	color: #52697a;
	text-decoration: none;
}

.matezex-term-breadcrumb .matezex-breadcrumb a:hover {
	color: #004cfe;
}

.matezex-term-breadcrumb .matezex-breadcrumb-sep {
	margin: 0 8px;
	color: #859cad;
}

.matezex-term-title {
	margin: 0 0 24px;
	color: #0a0d0f;
}

.matezex-term-hero-image {
	margin: 0 0 24px;
}

/* --- Text + fotka vedle sebe pod nadpisem (zadání klienta 7/2026) --- */
.matezex-term-hero-row {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	margin: 0 0 24px;
}

.matezex-term-hero-row .matezex-term-intro {
	flex: 1 1 55%;
	max-width: none;
}

.matezex-term-hero-row .matezex-term-hero-image {
	flex: 0 1 45%;
	margin: 0;
}

.matezex-term-content .matezex-term-hero-row .matezex-term-hero-image img {
	width: 100%;
	object-fit: cover;
}

@media (max-width: 768px) {
	.matezex-term-hero-row {
		flex-direction: column;
		gap: 20px;
	}

	.matezex-term-hero-row .matezex-term-intro,
	.matezex-term-hero-row .matezex-term-hero-image {
		flex: 1 1 auto;
		width: 100%;
	}
}

/* Parent class in the selector beats Elementor's `.elementor img { border-radius: 0 }` reset. */
.matezex-term-content .matezex-term-hero-image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 380px;
	border-radius: 32px;
}

@media (max-width: 640px) {
	.matezex-term-hero-image img {
		max-height: 260px;
	}
}

.matezex-term-intro {
	max-width: 900px;
}

.matezex-rich-text {
	color: #52697a;
	font-size: 16px;
	line-height: 1.6;
}

.matezex-rich-text p {
	margin: 0 0 1em;
}

.matezex-rich-text p:last-child {
	margin-bottom: 0;
}

.matezex-rich-text a {
	color: #004cfe;
}

/* Every image on category pages keeps the full 32px radius — no sharp corners.
 * Doubled/parented selectors outweigh Elementor's `.elementor img` reset. */
.matezex-term-content .matezex-rich-text img,
.matezex-term-below-table.matezex-rich-text img {
	border-radius: 32px;
}

.matezex-term-table-heading {
	margin: 32px 0 24px;
	color: #0a0d0f;
}

/* =========================================================================
   Content blocks
   ========================================================================= */

.matezex-term-blocks {
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin-top: 32px;
}

/* --- Gallery --- */
.matezex-gallery {
	display: grid;
	gap: 16px;
}

.matezex-gallery--cols-2 { grid-template-columns: repeat(2, 1fr); }
.matezex-gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
.matezex-gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }

.matezex-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 32px;
	background: #edf0f3;
}

.matezex-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 4 / 3;
	transition: transform 0.25s ease;
}

.matezex-gallery-item:hover img {
	transform: scale(1.03);
}

/* --- Image + text --- */
.matezex-image-text {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 32px;
	align-items: center;
}

.matezex-image-text--right .matezex-image-text__image {
	order: 2;
}

.matezex-image-text .matezex-image-text__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 32px;
}

/* --- Callout --- */
.matezex-callout {
	background: #edf0f3;
	border-left: 4px solid #004cfe;
	border-radius: 0 24px 24px 24px;
	padding: 24px 32px;
	color: #0a0d0f;
}

/* --- FAQ --- */
.matezex-faq {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 900px;
}

.matezex-faq-item {
	background: #edf0f3;
	border-radius: 16px;
	padding: 0;
	overflow: hidden;
}

.matezex-faq-question {
	cursor: pointer;
	list-style: none;
	padding: 16px 48px 16px 24px;
	font-size: 17px;
	font-weight: 500;
	color: #0a0d0f;
	position: relative;
}

.matezex-faq-question::-webkit-details-marker {
	display: none;
}

.matezex-faq-question::after {
	content: "";
	position: absolute;
	right: 24px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-right: 2px solid #004cfe;
	border-bottom: 2px solid #004cfe;
	transform: translateY(-70%) rotate(45deg);
	transition: transform 0.2s ease;
}

.matezex-faq-item[open] .matezex-faq-question::after {
	transform: translateY(-30%) rotate(225deg);
}

.matezex-faq-answer {
	padding: 0 24px 20px;
}

/* --- Text below table --- */
.matezex-term-below-table {
	margin-top: 40px;
	max-width: 900px;
}

/* =========================================================================
   Subcategory cards (parent-category archives / rozcestníky)
   ========================================================================= */

.matezex-subcategory-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.matezex-subcat-card {
	display: flex;
	flex-direction: column;
	background: #edf0f3;
	border-radius: 32px;
	overflow: hidden;
}

.matezex-subcat-card__image {
	display: block;
	background: #edf0f3;
}

.matezex-subcat-card__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 32px 32px 0 0;
	mix-blend-mode: multiply;
}

.matezex-subcat-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 24px;
	flex-grow: 1;
}

.matezex-subcat-card__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.matezex-subcat-card__title a {
	color: #004cfe;
	text-decoration: none;
}

.matezex-subcat-card__title a:hover {
	text-decoration: underline;
}

.matezex-subcat-card__btn {
	display: inline-block;
	margin-top: auto;
	padding: 10px 24px;
	background: #004cfe;
	color: #ffffff !important;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 999px;
	transition: background 0.2s ease;
}

.matezex-subcat-card__btn:hover {
	background: #0038c4;
	color: #ffffff;
}

/* =========================================================================
   Category cards (homepage / Produkty)
   ========================================================================= */

.matezex-category-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.matezex-cat-card {
	display: flex;
	flex-direction: column;
	background: #edf0f3;
	border-radius: 0 32px 32px 32px;
	overflow: hidden;
}

.matezex-cat-card__image {
	display: block;
	background: #edf0f3;
}

.matezex-cat-card__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0 32px 0 0;
	mix-blend-mode: multiply;
}

.matezex-cat-card__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 32px 24px;
}

.matezex-cat-card__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.matezex-cat-card__title a {
	color: #004cfe;
	text-decoration: none;
}

.matezex-cat-card__title a:hover {
	text-decoration: underline;
}

.matezex-cat-card__children {
	list-style: none;
	margin: 0;
	padding: 0 0 0 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.matezex-cat-card__children li {
	margin: 0;
}

.matezex-cat-card__children a {
	color: #52697a;
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
}

.matezex-cat-card__children a:hover {
	color: #004cfe;
}

/* --- CTA card (zakázková výroba) --- */
.matezex-cat-card--cta {
	grid-column: span 2;
	justify-content: flex-end;
	background-color: #141a1f;
	background-size: cover;
	background-position: center;
	position: relative;
	min-height: 320px;
}

.matezex-cat-card--cta::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 26, 31, 0) 30%, rgba(20, 26, 31, 0.85) 100%);
}

.matezex-cat-card__cta-body {
	position: relative;
	padding: 32px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.matezex-cat-card__cta-title {
	margin: 0;
	color: #ffffff;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}

.matezex-cat-card__cta-text {
	margin: 0;
	color: #eff2f5;
	font-size: 15px;
}

.matezex-cat-card__cta-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 24px;
	background: #eff2f5;
	color: #0a0d0f !important;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 999px;
	transition: background 0.2s ease;
}

.matezex-cat-card__cta-btn:hover {
	background: #ffffff;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1024px) {
	.matezex-category-cards,
	.matezex-subcategory-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.matezex-gallery--cols-3,
	.matezex-gallery--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.matezex-category-cards,
	.matezex-subcategory-cards {
		grid-template-columns: 1fr;
	}

	.matezex-cat-card--cta {
		grid-column: span 1;
	}

	.matezex-gallery,
	.matezex-gallery--cols-2,
	.matezex-gallery--cols-3,
	.matezex-gallery--cols-4 {
		grid-template-columns: 1fr;
	}

	.matezex-image-text {
		grid-template-columns: 1fr;
	}

	.matezex-image-text--right .matezex-image-text__image {
		order: 0;
	}
}
