/*
Theme Name: ExamDisha
Theme URI: https://examdisha.com
Author: ExamDisha Team
Author URI: https://examdisha.com
Description: A complete WordPress Education News Theme with Quiz Management, Content Lock, and Dashboards.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: examdisha
Tags: education, news, quiz, rtl-language-support, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, theme-options, threaded-comments
*/

/* ==========================================================================
   EXAMDISHA UNIVERSAL CARD, GRID & SPACING FIXES
   Ensures 100% consistent space between cards across all pages & screen sizes
   ========================================================================== */

/* 1. Universal Spacing for Stacked Sections & Containers */
.space-y-4 > * + * { margin-top: 1rem !important; }
.space-y-6 > * + * { margin-top: 1.5rem !important; }
.space-y-8 > * + * { margin-top: 2rem !important; }
.space-y-10 > * + * { margin-top: 2.5rem !important; }
.space-y-12 > * + * { margin-top: 3rem !important; }
.space-y-14 > * + * { margin-top: 3.5rem !important; }
.space-y-16 > * + * { margin-top: 4rem !important; }

/* 2. Universal Gaps & Hidden Priority */
.hidden { display: none !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.gap-10 { gap: 2.5rem !important; }

/* Responsive Grid & Flex Layout Fallbacks */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }

@media (min-width: 640px) {
	.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 768px) {
	.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
	.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
	.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
	.lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
	.lg\:col-span-8 { grid-column: span 8 / span 8 !important; }
	.lg\:col-span-7 { grid-column: span 7 / span 7 !important; }
	.lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
	.lg\:col-span-4 { grid-column: span 4 / span 4 !important; }
	.lg\:flex-row { flex-direction: row !important; }
	.lg\:w-2\/3 { width: 66.666667% !important; }
	.lg\:w-1\/3 { width: 33.333333% !important; }
}

/* 3. Cardview Distinct Separation & Shadows */
main.site-main section {
	margin-bottom: 2.5rem !important;
}
main.site-main section:last-child {
	margin-bottom: 0 !important;
}

.site-main .bg-white,
.site-main .dark\:bg-gray-800 {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	border-radius: 1.5rem;
	transition: all 0.25s ease-in-out;
}

.site-main .bg-white:hover,
.site-main .dark\:bg-gray-800:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* 4. Page Header Banner Override */
header.bg-gradient-to-r,
section[style*="linear-gradient"] {
	color: #ffffff !important;
	border-radius: 1.75rem !important;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08) !important;
}
header.bg-gradient-to-r h1,
section[style*="linear-gradient"] h1 {
	color: #ffffff !important;
}

/* 5. Universal Logo Dimensions (Header & Footer) */
.site-branding img,
.footer-branding img,
.custom-logo-link img {
	width: 250px !important;
	height: 100px !important;
	max-width: 250px !important;
	max-height: 100px !important;
	object-fit: contain !important;
	display: block !important;
}

/* ==========================================================================
   6. POST & PAGE TYPOGRAPHY STYLING (.entry-content)
   Restores rich text formatting stripped by Tailwind Preflight
   ========================================================================== */

.entry-content {
	color: #374151;
	line-height: 1.75;
	font-size: 1.0625rem;
}
.dark .entry-content {
	color: #d1d5db;
}

/* Headings */
.entry-content h1,
.entry-content .wp-block-heading h1,
.entry-content h1.wp-block-heading {
	font-size: 2.25rem !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
	margin-top: 2.5rem !important;
	margin-bottom: 1.25rem !important;
	color: #111827 !important;
	display: block !important;
}
.dark .entry-content h1,
.dark .entry-content .wp-block-heading h1,
.dark .entry-content h1.wp-block-heading {
	color: #ffffff !important;
}

.entry-content h2,
.entry-content .wp-block-heading h2,
.entry-content h2.wp-block-heading {
	font-size: 1.75rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	margin-top: 2.25rem !important;
	margin-bottom: 1rem !important;
	color: #1f2937 !important;
	border-left: 4px solid #2E8B57 !important;
	padding-left: 0.85rem !important;
	display: block !important;
}
.dark .entry-content h2,
.dark .entry-content .wp-block-heading h2,
.dark .entry-content h2.wp-block-heading {
	color: #f9fafb !important;
}

.entry-content h3,
.entry-content .wp-block-heading h3,
.entry-content h3.wp-block-heading {
	font-size: 1.375rem !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	margin-top: 1.75rem !important;
	margin-bottom: 0.75rem !important;
	color: #374151 !important;
	display: block !important;
}
.dark .entry-content h3,
.dark .entry-content .wp-block-heading h3,
.dark .entry-content h3.wp-block-heading {
	color: #e5e7eb !important;
}

.entry-content h4,
.entry-content .wp-block-heading h4,
.entry-content h4.wp-block-heading {
	font-size: 1.15rem !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	margin-top: 1.5rem !important;
	margin-bottom: 0.6rem !important;
	color: #4b5563 !important;
	display: block !important;
}
.dark .entry-content h4,
.dark .entry-content .wp-block-heading h4,
.dark .entry-content h4.wp-block-heading {
	color: #d1d5db !important;
}

.entry-content h5,
.entry-content h6,
.entry-content .wp-block-heading h5,
.entry-content .wp-block-heading h6 {
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	margin-top: 1.25rem !important;
	margin-bottom: 0.5rem !important;
	color: #4b5563 !important;
	display: block !important;
}
.dark .entry-content h5,
.dark .entry-content h6 {
	color: #d1d5db !important;
}

/* Paragraphs & Lists */
.entry-content p {
	margin-bottom: 1.25rem !important;
	line-height: 1.8 !important;
	font-size: 1.0625rem !important;
}

.entry-content ul:not(.examdisha-toc ul) {
	list-style-type: disc !important;
	padding-left: 1.75rem !important;
	margin-top: 0.75rem !important;
	margin-bottom: 1.25rem !important;
}
.entry-content ol:not(.examdisha-toc ol) {
	list-style-type: decimal !important;
	padding-left: 1.75rem !important;
	margin-top: 0.75rem !important;
	margin-bottom: 1.25rem !important;
}
.entry-content ul:not(.examdisha-toc ul) li,
.entry-content ol:not(.examdisha-toc ol) li {
	margin-bottom: 0.5rem !important;
	line-height: 1.65 !important;
	display: list-item !important;
}

/* Ensure TOC box maintains clean list structure */
.entry-content .examdisha-toc ul {
	list-style: none !important;
	padding-left: 0 !important;
	margin: 0 !important;
}
.entry-content .examdisha-toc li {
	margin-bottom: 0.5rem !important;
	display: list-item !important;
	list-style: none !important;
}

/* Text Formatting */
.entry-content strong,
.entry-content b {
	font-weight: 700 !important;
	color: #111827 !important;
}
.dark .entry-content strong,
.dark .entry-content b {
	color: #ffffff !important;
}

.entry-content em,
.entry-content i {
	font-style: italic;
}

.entry-content a:not(.btn-primary):not(.btn-secondary):not(.toc-link) {
	color: #2E8B57;
	text-decoration: underline;
	font-weight: 600;
	transition: color 0.2s ease;
}
.entry-content a:not(.btn-primary):not(.btn-secondary):not(.toc-link):hover {
	color: #1b5e39;
}

/* Blockquotes */
.entry-content blockquote {
	border-left: 4px solid #2E8B57;
	background-color: rgba(46, 139, 87, 0.06);
	padding: 1rem 1.5rem;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
	border-radius: 0 0.75rem 0.75rem 0;
	font-style: italic;
	color: #4b5563;
}
.dark .entry-content blockquote {
	background-color: rgba(46, 139, 87, 0.12);
	color: #d1d5db;
}

/* Tables */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
	border: 1px solid #e5e7eb;
	overflow-x: auto;
	display: block;
}
@media (min-width: 640px) {
	.entry-content table {
		display: table;
	}
}
.dark .entry-content table {
	border-color: #374151;
}
.entry-content th {
	background-color: #f9fafb;
	padding: 0.75rem 1rem;
	text-align: left;
	font-weight: 700;
	color: #111827;
	border-bottom: 2px solid #e5e7eb;
}
.dark .entry-content th {
	background-color: #1f2937;
	color: #f9fafb;
	border-bottom-color: #374151;
}
.entry-content td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #e5e7eb;
}
.dark .entry-content td {
	border-bottom-color: #374151;
}

/* Code & Preformatted */
.entry-content pre {
	background-color: #1f2937;
	color: #f3f4f6;
	padding: 1.25rem;
	border-radius: 0.75rem;
	overflow-x: auto;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.875rem;
}
.entry-content code {
	background-color: rgba(0, 0, 0, 0.06);
	color: #dc2626;
	padding: 0.2rem 0.4rem;
	border-radius: 0.25rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.875em;
}
.dark .entry-content code {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fca5a5;
}
.entry-content pre code {
	background-color: transparent;
	color: inherit;
	padding: 0;
}

/* Images & Media inside Content */
.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}
