/* Front-end styles for custom Gutenberg blocks */
.gutenberg-prose {
  > section,
  > .section {
    padding-top: var(--bl-padding-top, 0);
    padding-bottom: var(--bl-padding-bottom, 0);
  }

  @media (max-width: 1400px) {
    > section,
    > .section {
      padding-top: var(--bl-padding-xl-top, var(--bl-padding-top, 0));
      padding-bottom: var(--bl-padding-xl-bottom, var(--bl-padding-bottom, 0));
    }
  }

  @media (max-width: 1200px) {
    > section,
    > .section {
      padding-top: var(--bl-padding-lg-top, var(--bl-padding-top, 0));
      padding-bottom: var(--bl-padding-lg-bottom, var(--bl-padding-bottom, 0));
    }
  }

  @media (max-width: 1024px) {
    > section,
    > .section {
      padding-top: var(--bl-padding-md-top, var(--bl-padding-top, 0));
      padding-bottom: var(--bl-padding-md-bottom, var(--bl-padding-bottom, 0));
    }
  }

  @media (max-width: 768px) {
    > section,
    > .section {
      padding-top: var(--bl-padding-sm-top, var(--bl-padding-top, 0));
      padding-bottom: var(--bl-padding-sm-bottom, var(--bl-padding-bottom, 0));
    }
  }
}


.mstc-hero-block {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
}

.mstc-hero-block.alignment-left {
  text-align: left;
  justify-content: flex-start;
}

.mstc-hero-block.alignment-right {
  text-align: right;
  justify-content: flex-end;
}

.mstc-hero-block .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.mstc-hero-block .hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mstc-hero-block .hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.mstc-hero-block .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
}

.mstc-hero-block .hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.mstc-hero-block .hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.mstc-hero-block .hero-cta {
  display: inline-block;
  padding: 12px 24px;
  background: #007cba;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.mstc-hero-block .hero-cta:hover {
  background: #005a87;
  color: white;
}

.mstc-testimonial-block {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.mstc-testimonial-block .testimonial-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.mstc-testimonial-block .testimonial-image {
  flex: 0 0 100px;
}

.mstc-testimonial-block .testimonial-image img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mstc-testimonial-block .testimonial-text {
  flex: 1;
}

.mstc-testimonial-block .testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.6;
  position: relative;
}

.mstc-testimonial-block .testimonial-quote::before {
  content: '"';
  font-size: 3rem;
  color: #007cba;
  position: absolute;
  left: -1rem;
  top: -0.5rem;
}

.mstc-testimonial-block .testimonial-author {
  font-weight: bold;
  color: #333;
}

.mstc-testimonial-block .testimonial-position {
  color: #666;
  font-style: italic;
}

.mstc-program-card-block-inner {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
  padding: 1rem 2rem;
}

.mstc-program-card-block-inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.mstc-program-card-block-inner .program-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.mstc-program-card-block-inner .program-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mstc-program-card-block-inner .program-content {
  padding: 1.5rem;
}

.mstc-program-card-block-inner .program-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #333;
}

.mstc-program-card-block-inner .program-description {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.mstc-program-card-block-inner .program-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.mstc-program-card-block-inner .program-duration,
.mstc-program-card-block-inner .program-cost {
  background: #e9ecef;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  color: #495057;
}

.mstc-program-card-block-inner .program-link {
  text-align: center;
}

.mstc-program-card-block-inner .program-link a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #007cba;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.mstc-program-card-block-inner .program-link a:hover {
  background: #005a87;
  color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
  .mstc-hero-block .hero-title {
    font-size: 2rem;
  }

  .mstc-hero-block .hero-subtitle {
    font-size: 1rem;
  }

  .mstc-testimonial-block .testimonial-content {
    flex-direction: column;
    text-align: center;
  }

  .mstc-testimonial-block .testimonial-image {
    align-self: center;
  }

  .mstc-program-card-block-inner .program-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   FRONTEND TABLE STYLES (Matching Editor)
   ========================================================================== */

/* Target tables generated by Quill (table-better) within our blocks */
/* Specifically targeting .accordion-module based on inspection */
section.accordion-module table,
.accordion-block table,
table.ql-table-better {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  background: #fff;
}

section.accordion-module table td,
section.accordion-module table th,
.accordion-block table td,
.accordion-block table th,
table.ql-table-better td,
table.ql-table-better th {
  border: 1px solid #E0E0E0;
  /* Light grey matching reference */
  padding: 0.5em;
  /* Tighter padding matching frontend/editor */
  min-width: 100px;
  font-family: 'Gelasio', serif;
  font-size: 18px;
  color: #500617;
}

/* Table headers — vertically centred */
section.accordion-module table th,
.accordion-block table th,
table.ql-table-better th {
  vertical-align: middle;
}

/* Table body cells — top-aligned */
section.accordion-module table td,
.accordion-block table td,
table.ql-table-better td {
  vertical-align: top;
}

section.accordion-module table th,
.accordion-block table th,
table.ql-table-better th {
  background-color: #500617;
  color: #FFFFFF;
  font-weight: 700;
  font-family: 'Gotham', sans-serif;
  border-color: #500617;
  /* Header borders match bg */
}

/* Fix for Quill wrapping header content in p tags causing color inheritance issues */
section.accordion-module table th p,
.accordion-block table th p,
table.ql-table-better th p {
  color: #FFFFFF !important;
}

/* Light-theme table link styling — Burgundy (default) */
section.accordion-module table a:not(.btn),
.accordion-block table a:not(.btn),
table.ql-table-better a:not(.btn) {
  color: #840029;
  text-decoration: underline;
}

section.accordion-module table a:not(.btn):hover,
.accordion-block table a:not(.btn):hover,
table.ql-table-better a:not(.btn):hover {
  color: #B40015;
}

/* List styling within tables — ordered & unordered */
section.accordion-module table ol,
section.accordion-module table ul,
.accordion-block table ol,
.accordion-block table ul,
table.ql-table-better ol,
table.ql-table-better ul {
  margin: 0.25em 0;
  padding-left: 1.5em;
  color: #82142C;
}

section.accordion-module table li,
.accordion-block table li,
table.ql-table-better li {
  font-family: 'Gelasio', serif !important;
  font-size: 18px !important;
  line-height: 1.6 !important;
  color: #82142C !important;
  margin-bottom: 0.25em !important;
}

/* Zebra striping for even rows */
section.accordion-module table tr:nth-child(even),
.accordion-block table tr:nth-child(even),
table.ql-table-better tr:nth-child(even) {
  background-color: #F5F3F1;
  /* Light grey/cream matching reference */
}

/* ==========================================================================
   QUILL TEXT-ALIGNMENT CLASSES — Frontend Rendering
   Quill's Snow theme applies these classes in the editor but the editor CSS
   is NOT loaded on the frontend.  Mirror them here so alignment persists.
   ========================================================================== */

/* Contain floats globally within prose blocks so images don't bleed out */
.gutenberg-prose,
.accordion-content-inner,
.content-column {
  display: flow-root;
}

.gutenberg-prose .ql-align-center,
.accordion-block .ql-align-center {
  text-align: center;
}

.gutenberg-prose .ql-align-right,
.accordion-block .ql-align-right {
  text-align: right;
}

.gutenberg-prose .ql-align-justify,
.accordion-block .ql-align-justify {
  text-align: justify;
}

/* Left is the default — explicit class resets any inherited alignment */
.gutenberg-prose .ql-align-left,
.accordion-block .ql-align-left {
  text-align: left;
}

/* ==========================================================================
   QUILL IMAGE ALIGNMENT CLASSES — Custom Formatters
   ========================================================================== */
.ql-image-align-left {
  display: inline-block;
  float: left;
  margin: 0 1.5rem 1rem 0 !important;
  max-width: 100%;
}

.ql-image-align-right {
  display: inline-block;
  float: right;
  margin: 0 0 1rem 1.5rem !important;
  max-width: 100%;
}

.ql-image-align-center {
  display: block;
  margin: 0 auto 1.5rem auto !important;
  text-align: center;
  max-width: 100%;
}

.ql-image-align-left img,
.ql-image-align-right img,
.ql-image-align-center img {
  max-width: 100% !important;
  height: auto !important;
}

/* ==========================================================================
   QUILL CONTENT — Frontend Styles for Rich Text Formats
   ========================================================================== */

/* Superscript & Subscript */
.gutenberg-prose sup,
.gutenberg-prose sub,
.accordion-block sup,
.accordion-block sub {
  font-size: 0.75em;
}

/* Horizontal Rule */
.gutenberg-prose hr,
.accordion-block hr {
  border: none;
  border-top: 2px solid #e0e0e0;
  margin: 1.5rem 0;
}

.gutenberg-prose .mstc-tooltip-divider {
  margin-block: 10px 18px;
  border: 0;
  border-top: 1px solid #d9d9d9;
}

/* Blockquote */
.gutenberg-prose blockquote,
.accordion-block blockquote {
  border-left: 4px solid #FDB71A;
  padding-left: 1.5rem;
  margin: 1rem 0;
  font-style: italic;
  color: #500617;
}

/* Embedded Images — Base */
.gutenberg-prose img:not(.clear-style),
.accordion-block img:not(.clear-style) {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0;
}

/* Embedded Images — Rich-text content areas only
   These are images deliberately placed inside WYSIWYG description
   fields; they DO need vertical breathing room, but we use :not([style*="float"])
   or just low specificity so blotFormatter margins can apply freely. */
.gutenberg-prose [class*="description"] img:not([style*="float"]),
.gutenberg-prose [class*="__after-description"] img:not([style*="float"]),
.gutenberg-prose .content-column img:not([style*="float"]),
.gutenberg-prose .column-content img:not([style*="float"]),
.gutenberg-prose .accordion-content-inner img:not([style*="float"]),
.gutenberg-prose .side-by-side-content img:not([style*="float"]),
.gutenberg-prose .mstc-block-content img:not([style*="float"]),
.gutenberg-prose .block-description img:not([style*="float"]),
.accordion-block .accordion-content-inner img:not([style*="float"]) {
  margin: 0.75rem 0;
}

/* ==========================================================================
   CUSTOM PARAGRAPH CLASSES (Quill Editor Semantic Styles)
   ========================================================================== */

/**
 * Frontend styles for custom paragraph classes created by Quill editor.
 * These match the typography specifications for Body Text, Small Body, and Breadcrumb.
 */

/* Body Text - Standard paragraph styling */
p.body-text {
  font-family: 'Gelasio', serif !important;
  font-size: 20px !important;
  line-height: 162% !important;
  /* color: #500617 !important; */
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0% !important;
  margin-bottom: 1rem !important;
}

/* Small Body - Compact paragraph styling */
p.small-body {
  font-family: 'Gelasio', serif !important;
  font-size: 16px !important;
  line-height: 162% !important;
  /* color: #500617 !important; */
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0% !important;
  margin-bottom: 0.75rem !important;
}

/* Breadcrumb - Navigation/label styling */
p.breadcrumb {
  font-family: 'Gotham', sans-serif !important;
  font-size: 16px !important;
  line-height: 118% !important;
  /* color: #82142C !important; */
  font-weight: 325 !important;
  font-style: normal !important;
  letter-spacing: 0% !important;
  /* text-align: right !important; */
  vertical-align: middle !important;
  margin-bottom: 0.5rem !important;
}
