/* ==========================================================================
   Combustiva Medical — Public Styles
   Minimal reset to ensure plugin output is theme-agnostic.
   ========================================================================== */

/* — Featured image (rendered inside the_content, theme-agnostic) — */
.combustiva-featured-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 0 0 24px;
}

/* — Content + sidebar layout (rendered inside the_content, theme-agnostic) — */
.combustiva-content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	gap: 40px;
	align-items: start;
	max-width: 100%;
}

.combustiva-content-layout--sidebar-left {
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}

.combustiva-content-layout--sidebar-left .combustiva-content-sidebar {
	order: -1;
}

.combustiva-content-main,
.combustiva-content-sidebar {
	/* Grid items default to min-width: auto, which lets wide inline content
	   (long words, fixed-width embeds, the [combustiva_posts] card grid)
	   force the whole layout past the theme's content column instead of
	   shrinking to fit — this is what causes the "quebra de layout". */
	min-width: 0;
	overflow-wrap: break-word;
}

.combustiva-content-sidebar .widget {
	margin-bottom: 24px;
}

.combustiva-content-sidebar .widget:last-child {
	margin-bottom: 0;
}

@media ( max-width: 782px ) {
	.combustiva-content-layout {
		grid-template-columns: 1fr;
	}
}

/* — Menu list ([combustiva_menu]) — */
.combustiva-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.combustiva-menu__item + .combustiva-menu__item {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.combustiva-menu__item a {
	display: block;
	padding: 8px 0;
	text-decoration: none;
	color: inherit;
}

.combustiva-menu__item--active > a {
	font-weight: 700;
}

/* Nested level (tree="1") — the <ul> for a node's children sits directly
   inside its <li>, right after the <a>. */
.combustiva-menu__item > .combustiva-menu {
	margin: 4px 0 4px 16px;
}

/* — Grid wrapper — */
.combustiva-posts {
	display: grid;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.combustiva-posts--cols-1 { grid-template-columns: 1fr; }
.combustiva-posts--cols-2 { grid-template-columns: repeat(2, 1fr); }
.combustiva-posts--cols-3 { grid-template-columns: repeat(3, 1fr); }
.combustiva-posts--cols-4 { grid-template-columns: repeat(4, 1fr); }
.combustiva-posts--cols-5 { grid-template-columns: repeat(5, 1fr); }
.combustiva-posts--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media ( max-width: 768px ) {
	.combustiva-posts--cols-2,
	.combustiva-posts--cols-3,
	.combustiva-posts--cols-4,
	.combustiva-posts--cols-5,
	.combustiva-posts--cols-6 {
		grid-template-columns: 1fr;
	}
}

/* — Default card — */
.combustiva-post-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease;
}

.combustiva-post-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.combustiva-post-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.combustiva-post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.combustiva-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px;
	gap: 10px;
}

.combustiva-post-card__title {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.4;
}

.combustiva-post-card__title a {
	text-decoration: none;
	color: inherit;
}

.combustiva-post-card__title a:hover {
	text-decoration: underline;
}

.combustiva-post-card__excerpt {
	margin: 0;
	font-size: 0.9em;
	color: #64748b;
	line-height: 1.6;
	flex: 1;
}

.combustiva-post-card__link {
	display: inline-block;
	margin-top: auto;
	font-size: 0.875em;
	font-weight: 600;
	text-decoration: none;
	color: currentColor;
	border-bottom: 2px solid currentColor;
	padding-bottom: 1px;
}
