/* --- Main Blog Layout --- */
.blog-layout {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 3rem;
}

.blog-main {
	grid-column: 1 / 2;
	margin-top: 3rem;
	/* Added top margin */
}

.blog-sidebar {
	grid-column: 2 / 3;
	margin-top: 3rem;
	/* Added matching top margin */
}

.ql-sidebar {
	grid-column: 2 / 3;
	margin-top: 3rem;
}

/* --- Full Article Styling --- */
.article-full figure {
	margin: 0 0 1.5rem 0;
	/* Reset default figure margins */
}

.article-full figure img {
	width: 100%;
	height: auto;
	border-radius: var(--border-radius);
}

.article-full header {
	margin-bottom: 2rem;
}

.article-full h1 {
	font-size: 2.5rem;
	color: var(--primary-color);
	margin: 0;
}

.article-full .article-meta {
	font-size: 1rem;
	color: #777;
	margin-top: 0.5rem;
}

.article-full .article-author {
	font-weight: bold;
	color: var(--text-color);
}

.article-full .article-intro {
	font-size: 1.2rem;
	font-weight: bold;
	color: #555;
	line-height: 1.7;
	border-left: 4px solid var(--primary-color);
	padding-left: 1.5rem;
	margin-bottom: 2.5rem;
}

.article-full h2 {
	color: var(--primary-color);
	margin-top: 2.5rem;
}

.article-full p {
	font-size: 1.1rem;
	line-height: 1.8;
}

.article-full code {
	font-family: var(--tamil-font);
	background-color: var(--secondary-color);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 1.2rem;
}

/* --- Sidebar Styling --- */
.sidebar-widget {
	background-color: var(--secondary-color);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
	margin-top: 0;
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 0.75rem;
	color: var(--primary-color);
}

.recent-posts {
	list-style: none;
	padding: 0;
	margin: 0;
}

.recent-posts li {
	margin-bottom: 0.75rem;
}

.recent-posts a {
	text-decoration: none;
	color: var(--text-color);
	transition: color 0.2s;
}

.recent-posts a:hover {
	color: var(--primary-color);
}

.recent-posts a.active {
	color: var(--primary-color);
	font-weight: bold;
}

/* table */
.article-full table {
	width: 100%;
	border-collapse: collapse;
	margin: 2em 0;
	font-size: 1em;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-full table thead tr {
	background-color: var(--primary-color);
	color: #ffffff;
	text-align: left;
	font-weight: bold;
}

.article-full table th,
.article-full table td {
	padding: 12px 15px;
	text-align: left;
}

.article-full table tbody tr {
	border-bottom: 1px solid #dddddd;
	background-color: #f9f9f9;
}

.article-full table tbody tr:nth-of-type(even) {
	background-color: #ffffff;
}

.article-full table tbody tr:last-of-type {
	border-bottom: 2px solid var(--primary-color);
}

.article-full table tbody tr:hover {
	background-color: #e2e8f0;
	color: var(--primary-color);
	cursor: pointer;
}

/* Responsive Table Container */
.table-container {
	width: 100%;
	overflow-x: auto;
	margin-bottom: 2rem;
	border-radius: 8px;
	/* Matches table radius */
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	/* Moving shadow to container */
}

.table-container table {
	box-shadow: none;
	/* Remove shadow from table itself if inside container */
	margin: 0;
	/* Let container handle margins */
	min-width: 600px;
	/* Force scrolling on small screens */
}

/* Ensure Tamil font is used where needed */
.article-full table td:nth-child(2) {
	font-family: 'Latha', 'Catamaran', sans-serif;
}

/* Styles for the new example list */
.example-list {
	margin-top: 1.5em;
	padding: 0;
	list-style-type: none;
}

.example-item {
	background-color: #f8f9fa;
	border-left: 4px solid var(--primary-color);
	padding: 15px;
	margin-bottom: 1em;
	border-radius: 0 8px 8px 0;
}

.example-item .equation {
	font-weight: bold;
	font-size: 1.1em;
	color: #333;
	font-family: 'Latha', 'Catamaran', sans-serif;
}

.example-item .explanation {
	color: var(--primary-color);
	margin: 0.5em 0;
}

.example-item .meaning {
	color: #555;
	font-style: italic;
}

/* Styles for the embedded quiz */
.quiz-section {
	margin-top: 40px;
	padding: 20px;
	background-color: #f9f9f9;
	border-radius: 8px;
	border: 1px solid #eee;
}

.quiz-question {
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 1px solid #ddd;
}

.quiz-question:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.quiz-question p {
	font-size: 1.1em;
	font-weight: bold;
}

.quiz-options {
	list-style-type: none;
	padding-left: 0;
}

.quiz-options li {
	padding: 8px;
	margin: 5px 0;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
}

.quiz-answer {
	display: none;
	/* Hidden by default */
	margin-top: 15px;
	padding: 15px;
	background-color: #e7f3fe;
	border: 1px solid #b3d7f7;
	border-radius: 5px;
}

.quiz-answer .correct-answer {
	font-weight: bold;
	color: var(--primary-color);
}

.toggle-answer-btn {
	background-color: var(--primary-color);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.9em;
	margin-top: 10px;
}

.toggle-answer-btn:hover {
	background-color: var(--primary-hover);
}

@media (max-width: 768px) {
	h3 {
		font-size: 1.2rem;
	}

	.blog-layout {
		display: block;
		/* Stack naturally */
	}

	.blog-main {
		margin-bottom: 3rem;
		/* Space before sidebar */
	}

	.blog-sidebar,
	.ql-sidebar {
		margin-top: 0;
	}

	.article-full h1 {
		font-size: 2rem;
		color: var(--primary-color);
		margin: 0;
	}

	.article-full h2 {
		color: var(--primary-color);
		margin-top: 1.5rem;
		font-size: 1.5rem;
	}
}
