/*
Theme Name: MofakerAI Theme
Theme URI: https://mofakerai.com/
Template: twentytwentytwo
Author: MofakerAI
Description: Branded child theme for MofakerAI.com with visible logo, Arabic RTL layout, and AI editorial styling.
Version: 1.0.20
Text Domain: mofakerai-theme
*/

:root {
  --mofaker-navy: #142440;
  --mofaker-navy-2: #1c314f;
  --mofaker-teal: #17b8a6;
  --mofaker-teal-dark: #0f8f83;
  --mofaker-amber: #f5a623;
  --mofaker-gray: #9ca3af;
  --mofaker-text: #172033;
  --mofaker-muted: #5d6878;
  --mofaker-border: #dfe6ee;
  --mofaker-soft: #f1f5f9;
  --mofaker-light: #f6f8fb;
  --mofaker-white: #ffffff;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  background: var(--mofaker-light);
  color: var(--mofaker-text);
  direction: rtl;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

p {
  color: var(--mofaker-text);
  line-height: 1.9;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-post-title {
  color: var(--mofaker-navy);
  font-family: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 850;
  line-height: 1.38;
}

h1 {
  font-size: 2.35rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.35rem;
}

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

a {
  color: var(--mofaker-teal-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--mofaker-navy);
}

.mofaker-header {
  background: var(--mofaker-white);
  border-bottom: 1px solid rgba(20, 36, 64, 0.1);
  box-shadow: 0 10px 30px rgba(20, 36, 64, 0.06);
}

.mofaker-header-inner {
  min-height: 92px;
}

.mofaker-brand {
  gap: 14px;
}

.mofaker-brand .wp-block-site-logo img {
  max-height: 74px;
  width: auto;
}

.mofaker-brand .wp-block-site-title {
  display: none;
}

.mofaker-header .wp-block-site-title,
.mofaker-header .wp-block-site-title a,
.mofaker-header .wp-block-site-tagline {
  display: none !important;
}

.mofaker-nav a {
  color: var(--mofaker-navy);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 4px;
}

.mofaker-nav a:hover {
  color: var(--mofaker-teal);
}

.mofaker-hero {
  background: linear-gradient(135deg, #142440 0%, #17345a 58%, #17b8a6 100%);
  color: var(--mofaker-white);
  border-radius: 0;
}

.mofaker-hero h1,
.mofaker-hero p {
  color: var(--mofaker-white);
}

.mofaker-wordmark {
  color: var(--mofaker-white);
  display: inline-block;
  font-family: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.mofaker-hero p.has-large-font-size {
  max-width: 880px;
}

.mofaker-hero-mark {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 18px;
}

.mofaker-section-grid-wrap {
  background: var(--mofaker-white);
  border-bottom: 1px solid rgba(20, 36, 64, 0.08);
}

.mofaker-section-grid-wrap > .wp-block-group__inner-container,
.mofaker-section-grid-wrap {
  overflow: visible;
}

.mofaker-section-grid-title {
  color: var(--mofaker-navy);
  font-size: 1.65rem;
  font-size: 1.65rem !important;
  line-height: 1.4;
  margin-bottom: 18px;
}

.mofaker-section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
  width: 100%;
}

.mofaker-section-grid a {
  align-items: center;
  background: var(--mofaker-light);
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-right: 5px solid var(--mofaker-teal);
  border-radius: 8px;
  color: var(--mofaker-navy);
  display: flex;
  justify-content: flex-start;
  min-height: 92px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mofaker-section-grid a::before {
  background: var(--mofaker-navy) url("/wp-content/plugins/ai-thinker-content-studio/assets/brand/mofakerai-icon-app.png") center / 78% no-repeat;
  border: 1px solid rgba(23, 184, 166, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(20, 36, 64, 0.12);
  content: "";
  flex: 0 0 40px;
  height: 40px;
  margin-left: 14px;
  width: 40px;
}

.mofaker-section-grid a:hover {
  border-right-color: var(--mofaker-amber);
  box-shadow: 0 12px 24px rgba(20, 36, 64, 0.1);
  color: var(--mofaker-teal-dark);
  transform: translateY(-2px);
}

.mofaker-section-grid span {
  flex: 1 1 auto;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.wp-block-post-template > li,
.wp-block-post {
  background: var(--mofaker-white);
  border: 1px solid rgba(20, 36, 64, 0.09);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(20, 36, 64, 0.06);
  overflow: hidden;
  padding: 16px 16px 22px;
}

.wp-block-post-excerpt {
  display: none !important;
  color: var(--mofaker-muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

.wp-block-post-featured-image img {
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 36, 64, 0.11);
}

.wp-block-post-title a {
  color: var(--mofaker-navy);
}

.wp-block-post-title a:hover {
  color: var(--mofaker-teal);
}

.mofaker-home-latest {
  padding-bottom: 58px;
  padding-top: 22px;
}

.mofaker-home-latest .wp-block-post-template,
.mofaker-archive-grid .wp-block-post-template {
  gap: 28px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.mofaker-tools-archive .wp-block-post-template {
  gap: 24px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.mofaker-home-latest .wp-block-post-title {
  color: var(--mofaker-navy);
  font-size: 1.22rem;
  font-size: 1.22rem !important;
  font-weight: 800;
  line-height: 1.48;
  margin: 12px 0 8px;
}

main > .wp-block-post-title,
body main h1.wp-block-post-title {
  font-size: 2.4rem;
  font-size: 2.4rem !important;
  line-height: 1.45;
  margin-bottom: 18px;
}

.mofaker-archive-header {
  background: var(--mofaker-white);
  border-bottom: 1px solid rgba(20, 36, 64, 0.08);
}

.mofaker-archive-header .wp-block-query-title {
  color: var(--mofaker-navy);
  font-size: 2rem;
  font-size: 2rem !important;
  line-height: 1.35;
  margin-bottom: 10px;
}

.mofaker-archive-header .wp-block-term-description {
  color: var(--mofaker-muted);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 860px;
}

.mofaker-archive-grid {
  padding-bottom: 58px;
  padding-top: 28px;
}

.mofaker-archive-grid .wp-block-post-title {
  color: var(--mofaker-navy);
  font-size: 1.22rem;
  font-size: 1.22rem !important;
  font-weight: 800;
  line-height: 1.48;
  margin: 14px 0 8px;
}

.mofaker-archive-grid .wp-block-post-title a {
  color: var(--mofaker-navy);
  text-decoration: none;
}

.mofaker-archive-grid .wp-block-post-title a:hover {
  color: var(--mofaker-teal-dark);
}

main > .wp-block-post-excerpt,
main .wp-block-post-excerpt {
  color: var(--mofaker-muted);
}

.wp-block-button__link,
button,
input[type="submit"] {
  background: var(--mofaker-teal);
  border-radius: 8px;
  color: var(--mofaker-white);
  font-weight: 700;
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--mofaker-navy);
}

.aitcs-infographic {
  border-color: rgba(20, 36, 64, 0.14) !important;
}

.mofaker-article {
  color: var(--mofaker-text);
  font-size: 19px;
  line-height: 2.05;
  max-width: 840px;
}

.mofaker-article p {
  background: linear-gradient(270deg, rgba(23, 184, 166, 0.045), rgba(255, 255, 255, 0) 62%);
  border-radius: 8px;
  color: #1d2939;
  margin-bottom: 1.2em;
  padding: 4px 0;
}

.mofaker-article > p:first-of-type {
  background: linear-gradient(135deg, rgba(20, 36, 64, 0.04), rgba(23, 184, 166, 0.09));
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-right: 7px solid var(--mofaker-teal);
  box-shadow: 0 12px 30px rgba(20, 36, 64, 0.06);
  color: #142440;
  font-size: 1.04em;
  padding: 18px 20px;
}

.mofaker-article h2 {
  background: linear-gradient(90deg, #ffffff 0%, #f3fbfa 100%);
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-right: 7px solid var(--mofaker-teal);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 36, 64, 0.055);
  color: var(--mofaker-navy);
  font-size: 1.78rem;
  line-height: 1.45;
  margin-bottom: 18px;
  margin-top: 48px;
  padding: 14px 18px;
}

.mofaker-article h3 {
  background: rgba(245, 166, 35, 0.08);
  border-right: 5px solid var(--mofaker-amber);
  border-radius: 8px;
  color: var(--mofaker-navy-2);
  font-size: 1.32rem;
  line-height: 1.5;
  margin-top: 28px;
  padding: 10px 14px;
}

.mofaker-article table {
  border-collapse: collapse;
  width: 100%;
  margin: 28px 0;
  background: var(--mofaker-white);
  border-radius: 8px;
  color: var(--mofaker-text);
  display: block;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(20, 36, 64, 0.08);
}

.mofaker-article table tbody,
.mofaker-article table thead {
  display: table;
  min-width: 760px;
  width: 100%;
}

.mofaker-article th {
  background: var(--mofaker-navy);
  color: var(--mofaker-white);
  font-size: 0.98rem;
}

.mofaker-article th,
.mofaker-article td {
  border: 1px solid rgba(20, 36, 64, 0.12);
  padding: 14px;
  vertical-align: top;
}

.mofaker-article ul,
.mofaker-article ol {
  background: linear-gradient(135deg, #ffffff, #f8fcfb);
  border: 1px solid rgba(20, 36, 64, 0.09);
  border-right: 5px solid rgba(23, 184, 166, 0.55);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(20, 36, 64, 0.055);
  line-height: 1.95;
  margin: 22px 0;
  padding: 18px 34px 18px 18px;
}

.mofaker-article li {
  margin-bottom: 10px;
}

.mofaker-article strong {
  color: var(--mofaker-navy);
  font-weight: 850;
}

.mofaker-article figure {
  margin-bottom: 30px;
  margin-top: 28px;
}

.mofaker-article figcaption {
  background: rgba(20, 36, 64, 0.04);
  border-radius: 0 0 8px 8px;
  color: var(--mofaker-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 10px 14px;
}

.mofaker-article pre {
  background: #101c30;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 36, 64, 0.12);
  color: #eef6ff;
  direction: ltr;
  font-size: 0.95rem;
  line-height: 1.75;
  overflow-x: auto;
  padding: 18px;
  text-align: left;
  white-space: pre-wrap;
}

.mofaker-article code {
  font-family: Consolas, "Courier New", monospace;
}

.mofaker-summary {
  background: var(--mofaker-white) !important;
  border: 1px solid var(--mofaker-border) !important;
  border-right: 6px solid var(--mofaker-amber) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 26px rgba(20, 36, 64, 0.06);
  color: var(--mofaker-text);
  line-height: 1.9;
}

.mofaker-gallery figure {
  background: var(--mofaker-white);
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.mofaker-gallery img {
  display: block;
  width: 100%;
}

.mofaker-gallery figcaption {
  color: var(--mofaker-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 10px 12px 12px;
}

.mofaker-source-box {
  background: linear-gradient(135deg, rgba(20, 36, 64, 0.045), rgba(23, 184, 166, 0.08));
  border: 1px solid rgba(20, 36, 64, 0.12);
  border-right: 7px solid var(--mofaker-teal);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 36, 64, 0.06);
  color: var(--mofaker-text);
  margin: 34px 0 24px;
  padding: 18px 20px;
}

.mofaker-source-box p {
  background: transparent !important;
  color: var(--mofaker-text);
  line-height: 1.9;
  margin: 0;
  padding: 0;
}

.mofaker-source-box strong {
  color: var(--mofaker-navy);
}

.mofaker-source-box a {
  color: var(--mofaker-teal-dark);
  font-weight: 850;
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(20, 36, 64, 0.12);
}

.mofaker-tools-hero {
  background: linear-gradient(135deg, #142440 0%, #18365e 58%, #17b8a6 100%);
  color: var(--mofaker-white);
}

.mofaker-tools-hero h1,
.mofaker-tools-hero p {
  color: var(--mofaker-white);
}

.mofaker-tools-hero p {
  max-width: 920px;
  font-size: 19px;
}

.mofaker-tools-archive {
  padding-top: 34px;
  padding-bottom: 58px;
}

.mofaker-tool-card {
  background: #fff;
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-radius: 8px;
  padding: 12px;
  height: 100%;
  box-shadow: 0 10px 28px rgba(20, 36, 64, 0.08);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mofaker-tool-card:hover {
  border-color: rgba(23, 184, 166, 0.36);
  box-shadow: 0 14px 34px rgba(20, 36, 64, 0.13);
  transform: translateY(-2px);
}

.mofaker-tool-card .wp-block-post-featured-image {
  background: #f7fafc;
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.mofaker-tool-card .wp-block-post-featured-image img {
  display: block;
  transition: transform 220ms ease;
  width: 100%;
}

.mofaker-tool-card:hover .wp-block-post-featured-image img {
  transform: scale(1.018);
}

.mofaker-tool-card .wp-block-post-title {
  font-size: 20px;
  font-size: 20px !important;
  line-height: 1.45;
  margin: 14px 0 4px;
  text-align: center;
}

.mofaker-tool-card .wp-block-post-title a {
  color: var(--mofaker-navy);
  text-decoration: none;
}

.mofaker-tool-card .wp-block-post-title a:hover {
  color: var(--mofaker-teal-dark);
}

.mofaker-tool-card .wp-block-post-excerpt {
  color: var(--mofaker-muted);
  font-size: 16px;
  line-height: 1.85;
}

.mofaker-tool-single .wp-block-post-featured-image img {
  border-radius: 8px;
}

.mofaker-tool-titlebar {
  border-right: 8px solid var(--mofaker-teal);
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(20, 36, 64, 0.08);
}

.mofaker-tool-titlebar p:first-child {
  color: var(--mofaker-teal);
  font-weight: 800;
  margin: 0 0 8px;
}

.mofaker-tool-guide {
  color: var(--mofaker-text);
  font-size: 19px;
  line-height: 2.05;
  max-width: 840px;
}

.mofaker-tool-guide h2 {
  border-right: 6px solid var(--mofaker-teal);
  color: var(--mofaker-navy);
  font-size: 1.72rem;
  margin-top: 38px;
  padding-right: 14px;
}

.mofaker-tool-guide table {
  background: #fff;
  border-collapse: collapse;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 24px rgba(20, 36, 64, 0.08);
  margin: 26px 0;
  overflow: hidden;
  width: 100%;
}

.mofaker-tool-guide table tbody,
.mofaker-tool-guide table thead {
  display: table;
  min-width: 760px;
  width: 100%;
}

.mofaker-tool-guide th {
  background: var(--mofaker-navy);
  color: #fff;
}

.mofaker-tool-guide th,
.mofaker-tool-guide td {
  border: 1px solid rgba(20, 36, 64, 0.12);
  padding: 13px;
  vertical-align: top;
}

.mofaker-tool-guide ol {
  background: #fff;
  border: 1px solid rgba(20, 36, 64, 0.1);
  border-radius: 8px;
  padding: 18px 34px 18px 18px;
}

.tool-summary {
  background: #fff;
  border: 1px solid rgba(20, 36, 64, 0.12);
  border-right: 6px solid var(--mofaker-amber);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 18px;
  line-height: 1.85;
}

.tool-summary p {
  margin: 0;
}

.tool-summary strong {
  color: var(--mofaker-navy);
  display: inline-block;
  min-width: 92px;
}

.mofaker-footer {
  background: var(--mofaker-navy);
  color: var(--mofaker-white);
}

.mofaker-footer a,
.mofaker-footer p {
  color: var(--mofaker-white);
}

.mofaker-footer a {
  display: inline-block;
  margin: 0 0 8px 14px;
}

.mofaker-footer .mofaker-footer-links {
  line-height: 1.9;
  max-width: 720px;
}

.mofaker-static-page {
  background: var(--mofaker-white);
  border: 1px solid rgba(20, 36, 64, 0.08);
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(20, 36, 64, 0.06);
  margin-bottom: 38px;
  padding: 28px;
}

.mofaker-static-page .notice {
  background: var(--mofaker-soft);
  border-right: 6px solid var(--mofaker-amber);
  border-radius: 8px;
  padding: 16px 18px;
}

@media (max-width: 1100px) {
  .mofaker-tools-archive .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mofaker-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
    line-height: 1.85;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  h3 {
    font-size: 1.22rem;
  }

  .mofaker-header-inner {
    gap: 18px;
    justify-content: center !important;
    text-align: center;
  }

  .mofaker-brand .wp-block-site-logo img {
    max-height: 68px !important;
    width: auto !important;
  }

  .mofaker-tools-archive .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .mofaker-section-grid {
    grid-template-columns: 1fr !important;
  }

  .mofaker-section-grid-title,
  .mofaker-home-latest > .wp-block-heading {
    font-size: 1.35rem !important;
  }

  .mofaker-section-grid a {
    min-height: 56px;
  }

  .mofaker-section-grid a::before {
    flex-basis: 34px;
    height: 34px;
    margin-left: 10px;
    width: 34px;
  }

  .mofaker-archive-header .wp-block-query-title {
    font-size: 1.55rem !important;
    line-height: 1.45;
  }

  .mofaker-archive-header .wp-block-term-description {
    font-size: 0.96rem;
  }

  .mofaker-archive-grid .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .mofaker-home-latest .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .mofaker-archive-grid .wp-block-post-title {
    font-size: 1.08rem !important;
    line-height: 1.55;
  }

  .mofaker-home-latest .wp-block-post-title {
    font-size: 1.08rem !important;
    line-height: 1.55;
  }

  main > .wp-block-post-title,
  body main h1.wp-block-post-title {
    font-size: 1.75rem !important;
    line-height: 1.55 !important;
  }

  .mofaker-article,
  .mofaker-tool-guide {
    font-size: 17px;
    line-height: 1.95;
  }

  .mofaker-article h2,
  .mofaker-tool-guide h2 {
    font-size: 1.45rem;
    margin-top: 36px;
  }

  .mofaker-article ul,
  .mofaker-article ol,
  .mofaker-tool-guide ol {
    padding: 16px 28px 16px 14px;
  }
}
