/*
Theme Name: Enderûn LMS
Theme URI: https://algorithmikos.com/
Author: Algorithmikos (Umar Al-Fayez)
Author URI: https://algorithmikos.com/
Description: A sophisticated WordPress theme designed for Islamic educational institutions and academies. Features elegant sage styling, Islamic geometric patterns, comprehensive course management layouts, and responsive design. Perfect for madrasas, Islamic schools, Quranic academies, and online learning platforms. Includes specialized archive pages, course catalogs, and content-first page templates optimized for both Arabic RTL and English LTR content.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enderun
Tags: education, islamic, academy, courses, responsive, rtl-language-support, custom-post-types
*/

@import url("tailwind.css");

/* Ensure the body and html take up full height */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f8f8f5;
}

/* Main page structure - critical for footer placement */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures minimum height of viewport */
  max-height: 100vh; /* Prevents unnecessary extension beyond viewport */
  overflow-y: auto; /* Enables scrolling only when needed */
  font-family: "Cairo", sans-serif !important; /* Apply custom font */
}

/* Content wrapper must have flex-grow to push footer down */
.content-wrapper {
  flex: 1 0 auto; /* Grow to fill available space, don't shrink, respect auto basis */
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allows content to shrink when needed */
}

/* Footer styles - ensure it stays at bottom without forcing scrolling */
footer {
  flex-shrink: 0; /* Prevent footer from shrinking */
  width: 100%;
}

/* Global Typography Styles for WordPress Content */

/* Main content wrapper - apply to your content areas */
.wp-content, 
.post-content, 
.page-content,
.entry-content,
.prose {
  font-size: 18px;
  line-height: 1.7;
  color: #374151;
}

/* Headings */
.wp-content h1,
.post-content h1,
.page-content h1,
.entry-content h1,
.prose h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #111827;
}

.wp-content h2,
.post-content h2,
.page-content h2,
.entry-content h2,
.prose h2 {
  font-size: 2.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: #111827;
}

.wp-content h3,
.post-content h3,
.page-content h3,
.entry-content h3,
.prose h3 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.wp-content h4,
.post-content h4,
.page-content h4,
.entry-content h4,
.prose h4 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  color: #111827;
}

.wp-content h5,
.post-content h5,
.page-content h5,
.entry-content h5,
.prose h5 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

.wp-content h6,
.post-content h6,
.page-content h6,
.entry-content h6,
.prose h6 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

/* Paragraphs */
.wp-content p,
.post-content p,
.page-content p,
.entry-content p,
.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* Lists */
.wp-content ul,
.post-content ul,
.page-content ul,
.entry-content ul,
.prose ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.wp-content ol,
.post-content ol,
.page-content ol,
.entry-content ol,
.prose ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.wp-content li,
.post-content li,
.page-content li,
.entry-content li,
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.wp-content ul ul,
.wp-content ol ol,
.wp-content ul ol,
.wp-content ol ul,
.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul,
.page-content ul ul,
.page-content ol ol,
.page-content ul ol,
.page-content ol ul,
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul,
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Links */
.wp-content a,
.post-content a,
.page-content a,
.entry-content a,
.prose a {
  color: #059669;
  text-decoration: underline;
  text-decoration-color: #a7f3d0;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.wp-content a:hover,
.post-content a:hover,
.page-content a:hover,
.entry-content a:hover,
.prose a:hover {
  color: #047857;
  text-decoration-color: #059669;
}

/* Blockquotes */
.wp-content blockquote,
.post-content blockquote,
.page-content blockquote,
.entry-content blockquote,
.prose blockquote {
  border-left: 4px solid #b8c2a6;
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background-color: #f9fafb;
  font-style: italic;
  color: #4b5563;
}

/* Code blocks */
.wp-content code,
.post-content code,
.page-content code,
.entry-content code,
.prose code {
  background-color: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.wp-content pre,
.post-content pre,
.page-content pre,
.entry-content pre,
.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.wp-content pre code,
.post-content pre code,
.page-content pre code,
.entry-content pre code,
.prose pre code {
  background-color: transparent;
  padding: 0;
}

/* Tables */
.wp-content table,
.post-content table,
.page-content table,
.entry-content table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.wp-content th,
.wp-content td,
.post-content th,
.post-content td,
.page-content th,
.page-content td,
.entry-content th,
.entry-content td,
.prose th,
.prose td {
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  text-align: left;
}

.wp-content th,
.post-content th,
.page-content th,
.entry-content th,
.prose th {
  background-color: #f3f4f6;
  font-weight: 600;
}

/* Images */
.wp-content img,
.post-content img,
.page-content img,
.entry-content img,
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

/* Horizontal rules */
.wp-content hr,
.post-content hr,
.page-content hr,
.entry-content hr,
.prose hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* Strong and emphasis */
.wp-content strong,
.wp-content b,
.post-content strong,
.post-content b,
.page-content strong,
.page-content b,
.entry-content strong,
.entry-content b,
.prose strong,
.prose b {
  font-weight: 600;
  color: #111827;
}

.wp-content em,
.wp-content i,
.post-content em,
.post-content i,
.page-content em,
.page-content i,
.entry-content em,
.entry-content i,
.prose em,
.prose i {
  font-style: italic;
}

/* First paragraph special styling (optional) */
.wp-content > p:first-child,
.post-content > p:first-child,
.page-content > p:first-child,
.entry-content > p:first-child,
.prose > p:first-child {
  font-size: 1.125rem;
  color: #374151;
}