/**
 * Custom Block Styles
 * 
 * @package EDsmartData
 */

/* Related Pages Block */
.related-pages {
	margin: 3rem 0;
	padding: 2rem;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

.related-pages h2 {
	margin-top: 0;
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

.related-pages-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1rem;
}

.related-pages-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.related-pages-list li {
	margin-bottom: 0.75rem;
	padding-left: 1.5rem;
	position: relative;
}

.related-pages-list li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--primary);
}

.related-pages-list a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-weight: 500;
}

.related-pages-list a:hover {
	text-decoration: underline;
}

.related-page-item {
	padding: 1rem;
	background-color: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	transition: all 0.2s ease;
}

.related-page-item:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-page-item a {
	text-decoration: none;
	color: inherit;
}

.related-page-item h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
}

/* Insights & Analysis Block */
.insights-analysis {
	margin: 3rem 0;
	padding: 2rem;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

.insights-analysis h2 {
	margin-top: 0;
	margin-bottom: 2rem;
	font-size: 1.5rem;
}

.insights-section {
	margin-bottom: 2rem;
}

.insights-section:last-child {
	margin-bottom: 0;
}

.insights-section h3 {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.25rem;
	color: var(--wp--preset--color--text-primary);
}

.insights-section ul {
	list-style: disc;
	padding-left: 1.5rem;
	margin: 0;
}

.insights-section li {
	margin-bottom: 0.75rem;
	line-height: 1.6;
}

.insights-content {
	line-height: 1.8;
}

.insights-content p {
	margin-bottom: 1rem;
}

.insights-content p:last-child {
	margin-bottom: 0;
}

/* Comparison Tool Block */
.comparison-tool {
	margin: 3rem 0;
	padding: 2rem;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

.comparison-tool h2 {
	margin-top: 0;
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

.comparison-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	margin-top: 1rem;
}

.comparison-table {
	width: 100%;
	border-collapse: collapse;
	background-color: var(--wp--preset--color--background);
}

.comparison-table thead {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
}

.comparison-table th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	border: 1px solid var(--wp--preset--color--border);
}

.comparison-table thead th {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border-color: rgba(255, 255, 255, 0.2);
}

.comparison-table thead th a {
	color: var(--wp--preset--color--surface);
	text-decoration: none;
}

.comparison-table thead th a:hover {
	text-decoration: underline;
}

.comparison-table tbody th {
	background-color: var(--wp--preset--color--background);
	font-weight: 600;
}

.comparison-table td {
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--border);
}

.comparison-table tbody tr:nth-child(even) {
	background-color: var(--wp--preset--color--surface);
}

.comparison-table tbody tr:hover {
	background-color: rgba(47, 107, 255, 0.05);
}

/* FAQ Block */
.faq-section {
	margin: 3rem 0;
	padding: 2rem;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

.faq-section h2 {
	margin-top: 0;
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
}

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.faq-item {
	padding: 1.5rem;
	background-color: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	transition: all 0.2s ease;
}

.faq-item:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
}

.faq-answer {
	color: var(--wp--preset--color--text-secondary);
	line-height: 1.8;
}

.faq-answer p {
	margin-bottom: 1rem;
}

.faq-answer p:last-child {
	margin-bottom: 0;
}

/**
 * Outline buttons — dark footer blue fill + light text (matches single footer tone).
 */
.wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--surface, #ffffff) !important;
	border: none !important;
	background-color: var(--wp--preset--color--footer-bg, #0d1726) !important;
	box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	color: var(--wp--preset--color--surface, #ffffff) !important;
	background-color: var(--wp--preset--color--primary, #0a1c4a) !important;
	border: none !important;
	outline: none;
}

/* Single footer background (.site-footer = parts/footer.html outer group; avoid nested <footer>) */
.site-footer.has-footer-bg-background-color,
.site-footer.has-footer-bg-background-color .wp-block-group {
	background-color: var(--wp--preset--color--footer-bg, #0d1726) !important;
}

/* Responsive */
@media (max-width: 768px) {
	.related-pages-grid {
		grid-template-columns: 1fr;
	}
	
	.related-pages,
	.insights-analysis,
	.comparison-tool,
	.faq-section {
		padding: 1.5rem;
	}
	
	.comparison-table {
		font-size: 0.875rem;
	}
	
	.comparison-table th,
	.comparison-table td {
		padding: 0.75rem;
	}
	
	.faq-item {
		padding: 1rem;
	}
}

