/**
 * Strategic Content Engine — Front-end styles.
 *
 * Table styling + image layout + FAQ section styling.
 * All other content elements (headings, paragraphs, blockquotes,
 * lists) are handled by the active WordPress theme.
 *
 * @package StrategicContentEngine
 * @since   1.2.0
 */

/* ---- Tables ----------------------------------------------------------- */
.entry-content table,
.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.95em;
}

.entry-content table th,
.wp-block-post-content table th {
	background-color: #f1f5f9;
	font-weight: 600;
	text-align: left;
	padding: 0.75em 1em;
	border-bottom: 2px solid #cbd5e1;
}

.entry-content table td,
.wp-block-post-content table td {
	padding: 0.65em 1em;
	border-bottom: 1px solid #e2e8f0;
}

.entry-content table tbody tr:nth-child(even),
.wp-block-post-content table tbody tr:nth-child(even) {
	background-color: #f8fafc;
}

/* ---- In-content images ------------------------------------------------ */
.entry-content .wp-block-image,
.wp-block-post-content .wp-block-image {
	margin: 1.5em 0;
	clear: both;
}

.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}

.entry-content .wp-block-image figcaption,
.wp-block-post-content .wp-block-image figcaption {
	font-size: 0.85em;
	color: #64748b;
	margin-top: 0.5em;
	text-align: center;
	font-style: italic;
}

/* Center-aligned images: constrained width, centered */
.entry-content .wp-block-image.aligncenter,
.wp-block-post-content .wp-block-image.aligncenter {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	max-width: 100%;
}

/* Right-floated images: smaller, text wraps around them */
.entry-content .wp-block-image.alignright,
.wp-block-post-content .wp-block-image.alignright {
	float: right;
	max-width: 340px;
	margin: 0.25em 0 1em 1.5em;
	clear: right;
}

/* Clearfix for float containers */
.entry-content::after,
.wp-block-post-content::after {
	content: "";
	display: table;
	clear: both;
}

/* ---- FAQ section ------------------------------------------------------ */
.entry-content .sce-faq-section,
.wp-block-post-content .sce-faq-section {
	background-color: #f8fafc;
	border-left: 4px solid #3b82f6;
	padding: 1.5em 2em;
	margin: 2em 0;
	border-radius: 0 6px 6px 0;
}

.entry-content .sce-faq-section h2,
.wp-block-post-content .sce-faq-section h2 {
	margin-top: 0;
}

.entry-content .sce-faq-section h3,
.wp-block-post-content .sce-faq-section h3 {
	margin-bottom: 0.3em;
}

.entry-content .sce-faq-section p,
.wp-block-post-content .sce-faq-section p {
	margin-top: 0;
}

/* ---- Mobile responsive ------------------------------------------------ */
@media (max-width: 768px) {
	/* Stack floated images on small screens */
	.entry-content .wp-block-image.alignright,
	.wp-block-post-content .wp-block-image.alignright {
		float: none;
		max-width: 100%;
		margin: 1em 0;
	}

	/* Reduce FAQ padding on mobile */
	.entry-content .sce-faq-section,
	.wp-block-post-content .sce-faq-section {
		padding: 1em 1.25em;
	}
}
