/* =====================================================================
   BEM DZA (بيام ديزاد) — Public Design System & Stylesheet (app.css)
   Clean, modern, lightweight, mobile-first Arabic RTL styling.
   No external CDNs. No Tailwind / Bootstrap.
   ===================================================================== */

@font-face {
  font-family: 'Omar';
  src: url('../fonts/Omar-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-dark: #065f46;
  --secondary: #1e293b;
  --accent-blue: #2563eb;
  --accent-blue-light: #eff6ff;
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --container-max: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Omar', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* =====================================================================
   Container & Layout
   ===================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main-content {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* =====================================================================
   Header & Navigation
   ===================================================================== */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-sub);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
}

.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f1f5f9;
  color: var(--text-sub);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.5rem;
  border: 1px solid var(--border-color);
}

.nav-search-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
}

/* =====================================================================
   Hero Section & Quick Actions (Modern Redesign)
   ===================================================================== */
.hero-section {
  position: relative;
  background: var(--bg-surface);
  background-image: radial-gradient(circle at 15% 50%, rgba(5, 150, 105, 0.04), transparent 25%),
                    radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.04), transparent 25%);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 0 7rem;
  text-align: center;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-blue));
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-sub);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Search */
.hero-search-box {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.search-form-hero {
  display: flex;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.4rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form-hero:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  font-size: 1.05rem;
  color: var(--text-main);
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--text-muted);
}

.hero-search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.hero-search-btn:hover {
  background: var(--primary-hover);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 2px;
  height: 40px;
  background: var(--border-color);
}

/* Quick Actions Grid */
.quick-actions-section {
  margin-top: -3.5rem;
  position: relative;
  z-index: 20;
  margin-bottom: 4rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .quick-actions-section {
    margin-top: -2rem;
  }
  .hero-section {
    padding: 3rem 0 5rem;
  }
}

.action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.action-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.action-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.action-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.action-exam { background: #fef2f2; color: #dc2626; }
.action-test { background: #eff6ff; color: #2563eb; }
.action-lesson { background: #ecfdf5; color: #059669; }

.action-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* =====================================================================
   Section Headers
   ===================================================================== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -0.85rem;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* =====================================================================
   Subject Cards Grid & Cards (Modern Educational UI)
   ===================================================================== */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  .subjects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.subject-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 148px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -5px rgba(15, 23, 42, 0.07), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
  border-color: color-mix(in srgb, var(--subject-accent, var(--primary)) 45%, var(--border-color));
}

.subject-card:focus-visible {
  outline: 2px solid var(--subject-accent, var(--primary));
  outline-offset: 3px;
}

.subject-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.subject-icon-box {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--subject-accent, var(--primary));
  background-color: #f1f5f9;
  background-color: color-mix(in srgb, var(--subject-accent, var(--primary)) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--subject-accent, var(--primary)) 20%, transparent);
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.subject-icon-box svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  flex-shrink: 0;
  display: block;
}

.subject-card:hover .subject-icon-box {
  transform: scale(1.05);
  background-color: color-mix(in srgb, var(--subject-accent, var(--primary)) 18%, #ffffff);
}

.subject-card-info {
  flex: 1;
  min-width: 0;
}

.subject-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  transition: color 0.15s ease;
}

.subject-card:hover .subject-card-title {
  color: var(--subject-accent, var(--primary));
}

.subject-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.subject-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.85rem;
  margin-top: auto;
}

.subject-docs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.subject-badge-icon {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.subject-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--subject-accent, var(--primary));
  white-space: nowrap;
}

.subject-cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 1rem;
  line-height: 1;
}

.subject-card:hover .subject-card-cta .subject-cta-arrow {
  transform: translateX(-4px);
}

/* =====================================================================
   Document Cards Grid (Exams, Tests, Assignments)
   ===================================================================== */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.doc-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
}

.badge-exam {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-test {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-assignment {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-subject {
  background: #f1f5f9;
  color: #334155;
}

.badge-year {
  background: #f8fafc;
  color: #475569;
  border: 1px solid var(--border-color);
}

.doc-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.doc-card-title a {
  color: var(--text-main);
}

.doc-card-title a:hover {
  color: var(--primary);
}

.doc-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.doc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =====================================================================
   Educational & Article Cards Grid
   ===================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-card.has-image {
  padding: 0;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.post-card-image-link {
  display: block;
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 0.85rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.85rem;
}

.post-card-footer .btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

/* =====================================================================
   Detail Pages (Single View)
   ===================================================================== */
.article-container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.content-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-body p {
  margin-bottom: 1.15rem;
}

.content-body a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--primary);
  transition: all 0.2s ease;
}

.content-body a:hover {
  color: var(--primary-dark, #1d4ed8);
  border-bottom-style: solid;
}

/* Headings Hierarchy */
.content-body h2 {
  font-size: 1.6rem;
  color: var(--accent-blue);
  margin-top: 3rem;
  margin-bottom: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  padding-right: 1rem;
  border-right: 5px solid var(--accent-blue);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.content-body h3 {
  font-size: 1.35rem;
  color: var(--primary); /* Green accent */
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-weight: 800;
  line-height: 1.4;
}

.content-body h4 {
  font-size: 1.2rem;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.content-body h5 {
  font-size: 1.1rem;
  color: #475569;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

.content-body h6 {
  font-size: 1rem;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.4;
}

/* Lists */
.content-body ul, .content-body ol {
  margin-right: 1.5rem;
  margin-bottom: 1.15rem;
  padding-right: 1rem;
}

.content-body li {
  margin-bottom: 0.5rem;
}

.content-body ul li {
  list-style-type: disc;
}

.content-body ol li {
  list-style-type: decimal;
}

/* Blockquote */
.content-body blockquote {
  border-right: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  margin-bottom: 1.15rem;
  color: #475569;
  font-style: normal;
  font-size: 1.05rem;
}

/* Callouts / Notes */
.content-body .note, .content-body .callout, .content-body .alert-warning {
  background: #fffbeb;
  border-right: 4px solid #f59e0b;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  color: #92400e;
}

.content-body .edu-note, .content-body .alert-success {
  background: #ecfdf5;
  border-right: 4px solid #10b981;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  color: #065f46;
}

/* Tables */
.content-body table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.content-body th, .content-body td {
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  text-align: right;
}

.content-body th:first-child, .content-body td:first-child {
  border-left: none;
}

.content-body tr:last-child td {
  border-bottom: none;
}

.content-body th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--text-main);
}

.content-body tr:nth-child(even) td {
  background: #f8fafc;
}

/* Images */
.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 1.5rem auto;
  display: block;
}

/* Pre / Code */
.content-body pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 1.5rem;
  direction: ltr;
  text-align: left;
}

.content-body code {
  background: #f1f5f9;
  color: #e11d48;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* HR */
.content-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 2.5rem 0;
}

/* =====================================================================
   Document Detail Landing Page Box
   ===================================================================== */
.doc-info-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.doc-info-item {
  display: flex;
  flex-direction: column;
}

.doc-info-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.doc-info-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.doc-action-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* =====================================================================
   Breadcrumbs
   ===================================================================== */
.breadcrumb-nav {
  margin-bottom: 1.5rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: #cbd5e1;
}

.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 700;
}

/* =====================================================================
   Filter Bar
   ===================================================================== */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 180px;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-sub);
}

.filter-control {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.filter-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* =====================================================================
   Pagination
   ===================================================================== */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.875rem;
}

.page-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.page-btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* =====================================================================
   Empty State
   ===================================================================== */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  background: #f1f5f9;
  color: var(--text-muted);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

/* =====================================================================
   CTA Banner (Final Section)
   ===================================================================== */
.cta-banner {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 3.5rem;
  box-shadow: var(--shadow-md);
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  font-size: 1.1rem;
  color: #d1fae5;
  max-width: 600px;
  margin: 0 auto 1.75rem;
}

.cta-banner .btn-white {
  background: #ffffff;
  color: #065f46;
  font-weight: 800;
}

.cta-banner .btn-white:hover {
  background: #f8fafc;
  color: #047857;
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), #38bdf8, transparent);
  opacity: 0.8;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 3.5rem;
  margin-bottom: 2.75rem;
}

.footer-brand {
  flex: 0 0 340px;
  max-width: 380px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.footer-logo-badge {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}

.footer-brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.footer-brand-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.footer-brand-tagline {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 0.2rem;
}

.footer-brand-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.footer-contact-item:hover {
  color: #38bdf8;
}

.footer-nav-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2rem;
}

.footer-col-title {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  padding-bottom: 0.4rem;
}

.footer-col-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.88rem;
  display: inline-block;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-link:hover {
  color: #34d399;
  transform: translateX(-3px);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: #94a3b8;
  font-size: 0.84rem;
}

.footer-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e293b;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #334155;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.footer-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  flex-shrink: 0;
}

/* Fallback for legacy class if present */
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 3.5rem;
  margin-bottom: 2.75rem;
}
.footer-col h4 {
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.4rem;
}
.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.footer-links a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.footer-links a:hover {
  color: #34d399;
}

/* =====================================================================
   Responsive Breakpoints
   ===================================================================== */
@media (max-width: 1024px) {
  .footer-main {
    gap: 2.5rem;
  }
  .footer-brand {
    flex: 0 0 300px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 860px) {
  .footer-main {
    flex-direction: column;
    gap: 2.25rem;
  }
  .footer-brand {
    flex: 1 1 auto;
    max-width: 100%;
  }
  .footer-nav-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 4.5rem;
    right: 0;
    left: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    gap: 0.5rem;
  }

  .header-nav.is-open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .article-container {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

@media (max-width: 560px) {
  .site-footer {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
  }
  .footer-main {
    gap: 1.75rem;
    margin-bottom: 2rem;
  }
  .footer-nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1rem;
  }
  .footer-col-title {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
  .footer-links {
    gap: 0.5rem;
  }
  .footer-link, .footer-links a {
    font-size: 0.84rem;
  }
  .footer-brand-desc {
    font-size: 0.84rem;
    margin-bottom: 1rem;
  }
  .footer-bottom {
    padding-top: 1.25rem;
  }
  .footer-meta-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .doc-action-bar {
    flex-direction: column;
  }

  .doc-action-bar .btn {
    width: 100%;
  }
}

/* =====================================================================
   Semester Cards Grid & Item Styles (اختبارات وفروض الفصول)
   ===================================================================== */
.semester-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .semester-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.semester-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  position: relative;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

.semester-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
}

.semester-card.is-active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm);
}

.semester-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.semester-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-sub);
  transition: all 0.15s ease;
}

.semester-card.is-active .semester-badge {
  background: var(--primary);
  color: #ffffff;
}

.semester-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.semester-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  line-height: 1.3;
}

.semester-card.is-active .semester-card-title {
  color: var(--primary-dark);
}

.semester-card-action {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s ease;
}

.semester-card:hover .semester-card-action {
  color: var(--primary-hover);
  transform: translateX(-4px);
}

/* =====================================================================
   Intro Cards (بطاقات التعريف للأقسام والمواد)
   ===================================================================== */
.intro-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-right: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.intro-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.intro-card-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.intro-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.intro-card-body p {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0;
}

/* =====================================================================
   FAQ Accordion (الأسئلة الشائعة)
   ===================================================================== */
.faq-section {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-item.is-open {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: transparent;
  border: none;
  text-align: right;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.faq-trigger:hover {
  color: var(--primary);
  background-color: #f8fafc;
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
  flex-shrink: 0;
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-content {
  border-top: 1px solid #f1f5f9;
  background-color: #fbfcfd;
}

.faq-answer {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-sub);
}

/* =====================================================================
   Social & Share
   ===================================================================== */
.footer-social-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.footer-social-item:hover, .footer-social-item:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  outline: none;
}

.share-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 3rem 0;
  text-align: center;
}

.share-box-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.share-btn:hover, .share-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.share-telegram:hover, .share-telegram:focus-visible { color: #0088cc; border-color: #0088cc; background: #f0f9ff; }
.share-whatsapp:hover, .share-whatsapp:focus-visible { color: #25D366; border-color: #25D366; background: #f0fdf4; }
.share-facebook:hover, .share-facebook:focus-visible { color: #1877F2; border-color: #1877F2; background: #eff6ff; }
.share-copy:hover, .share-copy:focus-visible { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }


/* BEM DZA: mobile layout fixes for BOTH calculators on /moyenne */
@media (max-width: 767px) {
  #calcCards {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
  }
  #calcCards .calc-card {
    min-width: 0 !important;
    padding: 1rem !important;
    overflow-wrap: anywhere;
  }
  #calculators-wrapper {
    padding: 0.85rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  #calculators-wrapper h3 {
    font-size: 1.15rem !important;
    line-height: 1.5;
  }
  #calc-bem-container .table-responsive,
  #calc-school-container .table-responsive {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    direction: ltr;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
  }
  #calc-bem-container .table-responsive table,
  #calc-school-container .table-responsive table {
    direction: rtl;
    width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    table-layout: auto;
  }
  #calc-bem-container .table-responsive th,
  #calc-bem-container .table-responsive td,
  #calc-school-container .table-responsive th,
  #calc-school-container .table-responsive td {
    white-space: nowrap;
    padding: 0.5rem !important;
    vertical-align: middle;
  }
  #calc-bem-container .table-responsive th:first-child,
  #calc-bem-container .table-responsive td:first-child,
  #calc-school-container .table-responsive th:first-child,
  #calc-school-container .table-responsive td:first-child {
    white-space: normal;
    min-width: 7.5rem;
    max-width: 9rem;
  }
  #calc-bem-container input.bem-input,
  #calc-school-container input.school-input {
    width: 4.25rem !important;
    min-width: 4.25rem !important;
    max-width: 4.25rem !important;
    box-sizing: border-box;
    font-size: 16px !important;
    padding: 0.45rem 0.25rem !important;
  }
  #calc-school-container #btn-term-calc,
  #calc-school-container #btn-annual-calc {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    white-space: normal;
  }
  #calc-school-container #school-term-wrapper > div:first-child label,
  #calc-bem-container > div:nth-child(2) label {
    align-items: flex-start !important;
    line-height: 1.6;
  }
  #bem-result-container,
  #school-term-result {
    padding: 1rem !important;
  }
  #bem-result-container > div,
  #school-term-result > div {
    justify-content: space-between !important;
    gap: 0.75rem !important;
  }
  #bem-result-container > div > div,
  #school-term-result > div > div {
    flex: 1 1 7rem;
    min-width: 0;
  }
}
