/* =========================
   MFJ Modern Theme (No Bootstrap)
   ========================= */
:root{
  --mfj-bg: #0b0f14;
  --mfj-bg-2: #06080c;
  --mfj-surface: rgba(255,255,255,0.045);
  --mfj-surface-2: rgba(255,255,255,0.07);
  --mfj-border: rgba(255,255,255,0.14);
  --mfj-text: #e9eef5;
  --mfj-muted: rgba(233,238,245,0.72);
  --mfj-accent: #8fd3ff;
  --mfj-accent-2: #b9a7ff;

  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-lg: 0 18px 50px rgba(0,0,0,0.55);
  --shadow-md: 0 12px 30px rgba(0,0,0,0.45);

  --container: 1100px;
  --pad: 16px;
}

/* Reset-ish */
*{ box-sizing: border-box; }
html, body { height: 100%; width: 100%; overflow-x: hidden; }
body{
  margin: 0;
  background:
    radial-gradient(1200px 700px at 18% 0%, rgba(143,211,255,0.12), transparent 60%),
    radial-gradient(900px 600px at 90% 18%, rgba(185,167,255,0.10), transparent 55%),
    linear-gradient(180deg, var(--mfj-bg-2), var(--mfj-bg));
  color: var(--mfj-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a{ color: var(--mfj-accent); text-decoration: none; }
a:hover{ color: #c6ecff; text-decoration: underline; }

h1{ font-size: clamp(2rem, 1.4rem + 2vw, 3rem); letter-spacing: 0.02em; margin: 0 0 .8rem; }
h2{ font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.7rem); margin: 0 0 .6rem; }
h3{ font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); margin: 0 0 .55rem; }
p{ color: var(--mfj-muted); margin: 0 0 .9rem; }

pre{
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: rgba(233,238,245,0.82);
  margin: 0.8rem 0 0;
  padding: 0.9rem;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Container */
.mfj-container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Basic layout helpers */
.mfj-section-pad{ padding: 22px 0; }

.mfj-row{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.mfj-row-gap{ gap: 18px; }
.mfj-row-gap-sm{ gap: 10px; }
.mfj-align-start{ align-items: flex-start; }

.mfj-col{ flex: 1 1 0; min-width: 0; }

/* Responsive columns (like bootstrap-ish) */
.mfj-col-4-md{ flex: 1 1 100%; }
.mfj-col-8-lg{ flex: 1 1 100%; }
.mfj-col-4-lg{ flex: 1 1 100%; }

@media (min-width: 768px){
  .mfj-col-4-md{ flex: 0 0 calc(33.333% - 11px); }
}
@media (min-width: 992px){
  .mfj-col-4-lg{ flex: 0 0 calc(33.333% - 11px); }
  .mfj-col-8-lg{ flex: 0 0 calc(66.666% - 11px); }
}

.mfj-hide-until-md{ display: none; }
@media (min-width: 768px){
  .mfj-hide-until-md{ display: block; }
}

/* Main */
.mfj-main{ min-height: 60vh; }

/* =========================
   Header / Navbar
   ========================= */
.mfj-sticky{
  position: sticky;
  top: 0;
  z-index: 50;
}

.mfj-navbar{
  background: rgba(10,12,16,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mfj-nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.mfj-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mfj-logo{
  height: 44px;
  width: auto;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
}
@media (max-width: 576px){
  .mfj-logo{ height: 36px; }
}

.mfj-brand-text{
  font-weight: 800;
  letter-spacing: .03em;
  font-size: .95rem;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}

/* Desktop nav */
.mfj-nav-links{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.mfj-nav-links-desktop{ display: none; }

.mfj-nav-link{
  display: inline-flex;
  align-items: center;
  padding: 10px 10px;
  border-radius: 999px;
  color: rgba(233,238,245,0.9);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.mfj-nav-link:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.25);
  text-decoration: none;
}
.mfj-active{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

/* Burger (mobile) */
.mfj-burger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--mfj-text);
  cursor: pointer;
}
.mfj-burger:hover{ background: rgba(143,211,255,0.10); }

.mfj-burger-lines{
  width: 20px;
  height: 2px;
  background: var(--mfj-text);
  position: relative;
  border-radius: 999px;
}
.mfj-burger-lines::before,
.mfj-burger-lines::after{
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--mfj-text);
  border-radius: 999px;
}
.mfj-burger-lines::before{ top: -6px; }
.mfj-burger-lines::after{ top: 6px; }

/* Show desktop nav on large screens */
@media (min-width: 992px){
  .mfj-nav-links-desktop{ display: flex; }
  .mfj-burger{ display: none; }
}

/* Offcanvas */
.mfj-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 60;
}
.mfj-offcanvas{
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  background: rgba(10,12,16,0.96);
  border-left: 1px solid rgba(255,255,255,0.10);
  transform: translateX(100%);
  transition: transform .22s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 14px;
}

.mfj-offcanvas-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mfj-offcanvas-title{
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .95rem;
}
.mfj-offcanvas-close{
  width: 42px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--mfj-text);
  cursor: pointer;
}
.mfj-offcanvas-close:hover{ background: rgba(143,211,255,0.10); }

.mfj-nav-links-mobile{
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.mfj-nav-links-mobile .mfj-nav-link{
  justify-content: flex-start;
  border-radius: 14px;
  padding: 12px 12px;
}

/* Open state (JS adds these classes) */
body.mfj-no-scroll{ overflow: hidden; }
.mfj-backdrop.is-open{ opacity: 1; pointer-events: auto; }
.mfj-offcanvas.is-open{ transform: translateX(0); }

/* =========================
   Top blocks & sections
   ========================= */
.mfj_hr1, .mfj_hr2{
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(143,211,255,0.7), transparent);
  margin: .35rem 0;
}
.mfj_hr2{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185,167,255,0.7), transparent);
}

/* Cards / surfaces */
.mfj_toprow img{
  border-radius: var(--radius-lg);
  border: 1px solid var(--mfj-border);
  box-shadow: var(--shadow-lg);
}
.mfj_topcolCR3{
  background: var(--mfj-surface);
  border: 1px solid var(--mfj-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

/* Part headers */
.mfj_gridtop{
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--mfj-border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}
.mfj_gridtop h2, .mfj_gridtop h3{ margin: 0; }
.mfj_gridtop h2{
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: var(--mfj-text);
}
.mfj_gridtop h3{
  color: var(--mfj-muted);
  margin-top: 0.35rem;
}

/* Part content blocks */
.mfj_gridpart{ margin-top: 12px; }
.mfj_content_colL, .mfj_content_colC, .mfj_content_colR{
  background: var(--mfj-surface);
  border: 1px solid var(--mfj-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

.mfj_audio{ width: 100%; margin-bottom: 0.65rem; }

/* =========================
   Media / Video / Iframe
   ========================= */
/* Modern ratio wrapper */
.mfj-embed{
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--mfj-border);
  box-shadow: var(--shadow-lg);
}

/* 16:9 aspect ratio (key fix for your missing videos/iframes) */
.mfj-embed-16x9{
  aspect-ratio: 16 / 9;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 16 / 9){
  .mfj-embed-16x9{
    height: 0;
    padding-top: 56.25%;
  }
  .mfj-embed-16x9 .mfj-embed-item{
    position: absolute;
    inset: 0;
  }
}

.mfj-embed-item{
  width: 100%;
  height: 100%;
  border: 0;
}

/* Video section spacing */
.mfj_video{ margin: 16px 0; }

/* =========================
   Buttons / Links
   ========================= */
.mfj_partbuttondiv{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
}

.mfjbutton,
a.mfj_btn_link,
button.mfj_btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--mfj-text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.mfjbutton:hover,
a.mfj_btn_link:hover,
button.mfj_btn:hover{
  background: rgba(143,211,255,0.10);
  border-color: rgba(143,211,255,0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Primary action */
.mfj_btn{
  border-color: rgba(143,211,255,0.45);
  background: rgba(143,211,255,0.12);
}
.mfj_btn:hover{ background: rgba(143,211,255,0.18); }

/* =========================
   Footer
   ========================= */
.mfj_footer{
  border-top: 1px solid var(--mfj-border);
  background: rgba(0,0,0,0.20);
  margin-top: 30px;
}
.mfj-footer-pad{ padding: 34px 0; }

.mfj_footer h3{ color: var(--mfj-text); margin-bottom: 0.75rem; }

.mfj_footer_contact, .mfj_footer_mid, .mfj_footer_social{
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem var(--pad);
}

.mfj_footer_form label{ color: var(--mfj-muted); font-size: 0.95rem; }
.mfj_footer_form input,
.mfj_footer_form textarea,
.mfj_subscribe_form input{
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--mfj-text);
  outline: none;
}
.mfj_footer_form input:focus,
.mfj_footer_form textarea:focus,
.mfj_subscribe_form input:focus{
  border-color: rgba(143,211,255,0.45);
  box-shadow: 0 0 0 0.22rem rgba(143,211,255,0.12);
}

.mfj_form_row{ margin-bottom: 12px; }

.mfj_footer_mid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.mfj_purchase_card{
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--mfj-border);
  background: var(--mfj-surface);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}
.mfj_purchase_card img{
  width: 120px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.mfj_book_title{ font-weight: 900; letter-spacing: 0.05em; }
.mfj_book_author{ color: var(--mfj-muted); }

.mfj_purchase_btns{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.mfj_social_links{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mfj_msg{ display: inline-block; margin-top: 0.6rem; color: var(--mfj-accent); }

/* Footer desktop split */
@media (min-width: 992px){
  .mfj_footer_mid{
    grid-template-columns: 1fr 1.25fr;
    align-items: start;
  }
}

/* =========================
   Reveal animation
   ========================= */
.mfj-reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.mfj-reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}


/* =========================
   Audio cards: consistent preview + modal "Read more"
   (JS adds .mfj_excerpt + .mfj_readmore and hides the original <pre>)
   ========================= */
.mfj_excerpt{
  margin-top: 0.8rem;
  padding: 0.85rem;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  color: rgba(233,238,245,0.82);
  font-size: 0.95rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mfj_fulltext{ display: none; }

.mfj_readmore{
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(143,211,255,0.45);
  background: rgba(143,211,255,0.12);
  color: var(--mfj-text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.mfj_readmore:hover{
  transform: translateY(-1px);
  background: rgba(143,211,255,0.18);
}

/* Keep the audio cards visually aligned */
.mfj_gridpart .mfj_gridrow > div{
  display: flex;
  flex-direction: column;
}
.mfj_gridpart .mfj_audio{ width: 100%; }
.mfj_gridpart h2{ margin-top: 0.35rem; }
.mfj_gridpart .mfj_excerpt{ flex: 1 1 auto; }

/* =========================
   Modal (Read more)
   ========================= */
.mfj_modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
}
.mfj_modal.is-open{ display: flex; }

.mfj_modal_overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
}

.mfj_modal_dialog{
  position: relative;
  width: min(920px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.40));
  box-shadow: 0 30px 90px rgba(0,0,0,0.70);
  padding: 1.1rem;
}

.mfj_modal_header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.mfj_modal_title{
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}
.mfj_modal_close{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--mfj-text);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.mfj_modal_close:hover{
  background: rgba(255,255,255,0.10);
}

.mfj_modal_audio{
  width: 100%;
  margin: 0.35rem 0 0.9rem;
}

.mfj_modal_text{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0;
  padding: 0.95rem;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  color: rgba(233,238,245,0.86);
  line-height: 1.6;
}

/* =========================
   Footer: premium layout (3 panels)
   ========================= */
.mfj_footer_wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.mfj_footer_contact, .mfj_footer_mid, .mfj_footer_social{
  max-width: none; /* now controlled by .mfj_footer_wrap */
  margin: 0;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(0,0,0,0.18));
}

.mfj_footer_contact h3,
.mfj_footer_mid h3,
.mfj_footer_social h3{
  margin-top: 0;
  letter-spacing: 0.02em;
}

@media (min-width: 992px){
  .mfj_footer_wrap{
    grid-template-columns: 1fr 1.1fr;
    grid-template-areas:
      "contact purchase"
      "social  purchase";
    align-items: start;
  }
  .mfj_footer_contact{ grid-area: contact; }
  .mfj_footer_mid{ grid-area: purchase; }
  .mfj_footer_social{ grid-area: social; }
}
