/* ═══════════════════════════════════════════════
   MANUAL GRID BLOCK
   ═══════════════════════════════════════════════ */

.manual-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.grid-card {
	background: rgba(242, 242, 242, 0.95);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.2s ease, background 0.2s ease;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.grid-card:hover {
	transform: translateY(-3px);
	background: #FFF;
}

.grid-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	text-decoration: none !important;
	color: inherit;
}

.grid-thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 12px;
	overflow: hidden;
	background: #e0e0e0;
}

.grid-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.grid-name {
	font-size: 14px;
	font-weight: 600;
	color: #5e2ea0;
}

.grid-card:hover .grid-name {
	color: #a86be1;
}

/* Responsive */
@media (max-width: 1024px) {
	.manual-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.manual-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.manual-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   Q&A WIDGET BLOCK
   ═══════════════════════════════════════════════ */

.elementor-qa-wrapper {
	margin-bottom: 20px;
}

.qa-question {
	font-weight: bold;
	position: relative;
	padding: 12px 20px;
	background-color: #f9f9f9;
	border-left: 5px solid #191970;
	transition: background 0.3s ease, color 0.3s ease;
}

[data-toggle="true"] .qa-question {
	cursor: pointer;
	user-select: none;
}

.qa-toggle-icon {
	float: right;
	font-size: 20px;
	font-weight: bold;
	transition: transform 0.3s ease;
	line-height: 1.4;
}

[data-toggle="true"] .qa-question.qa-open .qa-toggle-icon {
	transform: rotate(45deg);
}

/*
 * Answer is always in the DOM so search engines can index the content.
 * Toggle mode collapses it visually with max-height + opacity transitions.
 */
.qa-answer {
	padding: 15px 20px;
	background-color: #ffffff;
	border: 1px solid #eee;
	border-top: none;
	line-height: 1.6;
	overflow: hidden;
	transition:
		max-height    0.35s ease,
		opacity       0.30s ease,
		padding-top   0.30s ease,
		padding-bottom 0.30s ease,
		border-color  0.30s ease;
}

/* Toggle mode — collapsed (default state) */
[data-toggle="true"] .qa-answer {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
	border-color: transparent;
	pointer-events: none;
}

/* Toggle mode — expanded */
[data-toggle="true"] .qa-answer.qa-answer-open {
	max-height: 2000px;
	opacity: 1;
	padding-top: 15px;
	padding-bottom: 15px;
	border-color: #eee;
	pointer-events: auto;
}

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

/* ═══════════════════════════════════════════════
   GUTENBERG EDITOR — overrides
   ═══════════════════════════════════════════════ */

/* Keep answer always visible while editing */
.block-editor-block-list__block [data-toggle] .qa-answer {
	max-height: none !important;
	opacity: 1 !important;
	padding-top: 15px !important;
	padding-bottom: 15px !important;
	border-color: #eee !important;
	pointer-events: auto !important;
}

/* Hover outline on editable regions */
.block-editor-block-list__block .qa-question:hover,
.block-editor-block-list__block .qa-answer:hover {
	outline: 1px dashed #b0b0b0;
	outline-offset: 2px;
}

/* Placeholder text colour */
.block-editor-block-list__block .qa-question [data-rich-text-placeholder],
.block-editor-block-list__block .qa-answer [data-rich-text-placeholder] {
	color: #bbb;
	font-style: italic;
}