/* ==========================================================
   Frontend modern layer — loaded on every public page.
   Shared tokens, mobile safety, buttons, forms, panels,
   CMS/rich-text content and footer.
   Page-specific stylesheets (css/<page>.css) build on this.
   ========================================================== */
:root {
  --fm-purple: #5a1fd3;
  --fm-purple-2: #7b19cb;
  --fm-purple-3: #4d22d7;
  --fm-ink: #1f1640;
  --fm-muted: #6b6785;
  --fm-line: #ece9f6;
  --fm-soft: #f6f4fd;
  --fm-orange-1: #fc9715;
  --fm-orange-2: #e45b2d;
  --fm-yellow: #ffeb3b;
  --fm-green: #16a36a;
  --fm-radius: 24px;
  --fm-shadow: 0 18px 50px rgba(60, 30, 140, 0.07);
  --fm-shadow-lg: 0 24px 60px rgba(60, 30, 140, 0.12);
}

/* ---------- mobile safety ---------- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}
img,
video,
iframe,
embed,
object {
  max-width: 100%;
}
img {
  height: auto;
}
.container {
  max-width: 100%;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

/* theme reset sets h2 to 60px — scale headings down on small screens */
@media (max-width: 991px) {
  h2, h2 > a { font-size: 40px; }
  h3, h3 > a { font-size: 24px; }
}
@media (max-width: 575px) {
  h1, h1 > a { font-size: 32px; }
  h2, h2 > a { font-size: 30px; }
  h3, h3 > a { font-size: 21px; }
  h4, h4 > a { font-size: 19px; }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---------- panels ---------- */
.main-area {
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  background: #fff;
  box-shadow: var(--fm-shadow-lg);
}
.main-box-shadow {
  box-shadow: var(--fm-shadow-lg) !important;
}
@media (min-width: 768px) {
  .main-area {
    padding: 44px 44px 40px;
  }
}
@media (max-width: 767px) {
  .main-area {
    padding: 26px 18px;
    border-radius: 18px;
  }
}

/* ---------- buttons ---------- */
.btn {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-round {
  border-radius: 999px;
}
.btn-primary,
.btn-primary:focus {
  color: #fff;
  background-image: linear-gradient(135deg, var(--fm-purple-2), var(--fm-purple));
  box-shadow: 0 10px 22px rgba(90, 31, 211, 0.28);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 28px rgba(90, 31, 211, 0.4);
}
.btn-secondary,
.btn-secondary:focus {
  color: #fff;
  background-image: linear-gradient(135deg, var(--fm-orange-1), var(--fm-orange-2));
  box-shadow: 0 10px 22px rgba(228, 91, 45, 0.35);
}
.btn-secondary:hover {
  color: #fff;
  box-shadow: 0 14px 28px rgba(228, 91, 45, 0.48);
}
.btn:focus-visible {
  outline: 3px solid rgba(90, 31, 211, 0.35);
  outline-offset: 2px;
}

/* ---------- forms ---------- */
.form-control,
.nice-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
  border: 1.5px solid #e3def5;
  border-radius: 12px;
  background-color: #fff;
  color: var(--fm-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--fm-purple);
  box-shadow: 0 0 0 4px rgba(90, 31, 211, 0.12);
  outline: none;
}
label {
  color: var(--fm-ink);
  font-weight: 600;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--fm-purple);
}
@media (max-width: 575px) {
  /* 16px stops iOS zooming into fields */
  .form-control,
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ---------- tables ---------- */
.table {
  color: var(--fm-ink);
}
.table thead th {
  border-bottom: 2px solid var(--fm-line);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fm-muted);
}
.table td,
.table th {
  border-top-color: var(--fm-line);
  vertical-align: middle;
}
@media (max-width: 767px) {
  .main-area table,
  .blog-single-details table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- pagination ---------- */
.pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.pagination .page-link {
  min-width: 40px;
  border: none;
  border-radius: 10px !important;
  text-align: center;
  color: var(--fm-purple);
  background: var(--fm-soft);
}
.pagination .page-item.active .page-link {
  color: #fff;
  background: var(--fm-purple);
}

/* ---------- CMS / rich-text content ---------- */
.fm-prose,
.blog-single-details {
  font-size: 16px;
  line-height: 1.8;
  color: var(--fm-muted);
  overflow-wrap: anywhere;
}
.fm-prose h1, .fm-prose h2, .fm-prose h3, .fm-prose h4, .fm-prose h5, .fm-prose h6,
.blog-single-details h1, .blog-single-details h2, .blog-single-details h3,
.blog-single-details h4, .blog-single-details h5, .blog-single-details h6 {
  margin: 32px 0 12px;
  font-size: 22px !important;
  line-height: 1.35;
  font-weight: 700;
  color: var(--fm-ink) !important;
  text-transform: none;
}
.fm-prose h1, .blog-single-details h1 { font-size: 28px !important; }
.fm-prose h2, .blog-single-details h2 { font-size: 24px !important; }
.fm-prose h5, .fm-prose h6,
.blog-single-details h5, .blog-single-details h6 { font-size: 18px !important; }
.fm-prose > :first-child,
.blog-single-details > :first-child {
  margin-top: 0;
}
/* editor content often wraps headings in <p><strong> */
.blog-single-details p > strong:only-child,
.blog-single-details p > b:only-child {
  display: block;
  margin-top: 18px;
  font-size: 18px;
  color: var(--fm-ink);
}
.fm-prose p,
.blog-single-details p {
  margin: 0 0 14px;
}
.fm-prose a,
.blog-single-details a {
  display: inline;
  color: var(--fm-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fm-prose ul,
.blog-single-details ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.fm-prose ul li,
.blog-single-details ul li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 30px;
}
.fm-prose ul li::before,
.blog-single-details ul li::before {
  content: "\f00c";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "FontAwesome";
  font-size: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--fm-orange-1), var(--fm-orange-2));
}
.fm-prose ol,
.blog-single-details ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.fm-prose ol li,
.blog-single-details ol li {
  margin-bottom: 8px;
  padding-left: 4px;
}
.fm-prose ol li::marker,
.blog-single-details ol li::marker {
  font-weight: 700;
  color: var(--fm-purple);
}
.fm-prose img,
.blog-single-details img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 14px;
}
.fm-prose blockquote,
.blog-single-details blockquote {
  margin: 0 0 18px;
  padding: 18px 22px;
  border-left: 4px solid var(--fm-purple);
  border-radius: 0 14px 14px 0;
  background: var(--fm-soft);
  color: var(--fm-ink);
}
.fm-prose table,
.blog-single-details table {
  width: 100%;
  margin-bottom: 18px;
  border-collapse: collapse;
}
.fm-prose td, .fm-prose th,
.blog-single-details td, .blog-single-details th {
  padding: 10px 12px;
  border: 1px solid var(--fm-line);
}
/* fixed-width blocks pasted from other sites */
.blog-single-details [style*="width"],
.fm-prose [style*="width"] {
  max-width: 100% !important;
}
@media (max-width: 575px) {
  .fm-prose,
  .blog-single-details {
    font-size: 15px;
  }
}

/* ---------- shared eyebrow / section head (for any page) ---------- */
.fm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fm-purple);
  background: rgba(90, 31, 211, 0.08);
}
.fm-eyebrow--orange {
  color: var(--fm-orange-2);
  background: rgba(228, 91, 45, 0.1);
}
.fm-eyebrow--green {
  color: var(--fm-green);
  background: rgba(22, 163, 106, 0.1);
}

/* ---------- footer ---------- */
.footer-section .footer-top {
  position: relative;
  padding-top: 170px;
  padding-bottom: 50px;
  background-color: #4d22d7;
  /* the wave image's top pixel row shows as a thin line — nudge it out of view */
  background-position: center top -3px;
  border: none;
}
.footer-section {
  border: none;
}
.fm-footer-brand {
  margin-bottom: 30px;
}
.fm-footer-brand__logo {
  display: inline-block;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.fm-footer-brand__logo img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}
.fm-footer-brand p {
  margin: 18px 0 18px;
  max-width: 300px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}
.fm-footer-contact {
  margin: 0;
  padding: 0;
  list-style: none;
}
.fm-footer-contact li + li {
  margin-top: 10px;
}
.fm-footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  overflow-wrap: anywhere;
}
.fm-footer-contact a:hover {
  color: var(--fm-yellow);
}
.fm-footer-contact i {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--fm-yellow);
  background: rgba(255, 255, 255, 0.12);
}
.footer-widget {
  margin-bottom: 30px;
}
.footer-widget .widget-title,
.footer-section .footer-widget .widget-title {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 12px;
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
}
.footer-widget .widget-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--fm-orange-1), var(--fm-orange-2));
}
.footer-widget .footer-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-widget .footer-menu-list li + li {
  margin-top: 10px;
}
.footer-widget .footer-menu-list li a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}
.footer-widget .footer-menu-list li a::before {
  content: "\f105";
  margin-right: 8px;
  opacity: 0.7;
}
.footer-widget .footer-menu-list li a:hover {
  padding-left: 6px;
  color: var(--fm-yellow);
}
.fm-footer-apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 22px 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}
.fm-footer-apps h4 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #fff;
  text-transform: none;
}
.fm-footer-apps p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}
.fm-footer-apps .btn-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 !important;
}
.fm-footer-apps .btn-area a {
  margin: 0 !important;
}
.fm-footer-apps .btn-area {
  gap: 14px;
}
.fm-footer-apps .btn-area img {
  height: 64px;
  width: auto;
  transition: transform 0.2s ease;
}
.fm-footer-apps .btn-area a:hover img {
  transform: translateY(-2px);
}
@media (max-width: 575px) {
  .fm-footer-apps .btn-area img {
    height: 54px;
  }
}
.footer-bottom {
  padding: 20px 0;
  background-color: #170f59;
}
.footer-bottom .copy-right-text {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.footer-bottom .card-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.footer-bottom .card-list a + a {
  margin-left: 0;
}
.footer-bottom .card-list img {
  height: 26px;
  width: auto;
  border-radius: 6px;
}
@media (max-width: 991px) {
  .footer-section .footer-top {
    padding-top: 130px;
  }
}
@media (max-width: 767px) {
  .footer-section .footer-top {
    padding-top: 100px;
    padding-bottom: 30px;
  }
  .fm-footer-apps {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .footer-bottom .copy-right-text,
  .footer-bottom .card-list {
    justify-content: center;
    text-align: center;
  }
  .footer-bottom .card-list {
    margin-top: 12px;
  }
}

/* ---------- scroll to top ---------- */
.scroll-to-top {
  border-radius: 14px !important;
  background-image: linear-gradient(135deg, var(--fm-orange-1), var(--fm-orange-2)) !important;
  box-shadow: 0 10px 22px rgba(228, 91, 45, 0.4) !important;
}
.scroll-to-top {
  line-height: 55px !important;
}

/* header top bar currency picker keeps its plain look */
.header-section select,
.header-section select:focus {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
}
