/* NHIS News & Updates: Bloom blog design (listing + single post). Scoped to .nhnw so the school header and footer are untouched. */
/* ===== Isolated Elementor-safe styles ===== */

/* Everything lives inside ONE root element so the theme's page-content
   area only ever sees a single child to place — it can't split the
   title and the cards into separate flex/grid items and misplace them
   relative to each other. We still force this single root to behave as
   a normal full-width block (some themes make the content area a flex
   or grid container, or give it a fixed height with overflow hidden). */
.ec-blog-root {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 100% !important;
  grid-column: 1 / -1 !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.ec-cards-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.ec-cards-wrapper *,
.ec-cards-wrapper *::before,
.ec-cards-wrapper *::after {
  box-sizing: border-box;
}

.ec-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .ec-cards-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
    gap: 32px;
  }
}

.ec-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
}

.ec-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  display: block;
}

/* Left card */
.ec-left {
  background: var(--nh-a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ec-toolbox {
  width: 200px;
  height: 120px;
  position: relative;
}

.ec-toolbox-handle {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95px;
  height: 20px;
  background: #d0d0d0;
  border-radius: 10px 10px 0 0;
}

.ec-toolbox-handle::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  right: 8px;
  height: 7px;
  background: #e8e8e8;
  border-radius: 4px;
}

.ec-toolbox-body {
  width: 100%;
  height: 100%;
  background: var(--nh-d);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ec-toolbox-screen {
  position: absolute;
  top: 28px;
  left: 16px;
  width: 115px;
  height: 44px;
  background: #1a1a1a;
  border-radius: 5px;
}

.ec-toolbox-dial {
  position: absolute;
  top: 32px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: color-mix(in srgb, var(--nh-d) 80%, #000);
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--nh-a) 35%, #fff);
}

.ec-toolbox-dial::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
}

/* Middle card */
.ec-middle {
  background: linear-gradient(145deg, var(--nh-s) 0%, var(--nh-f) 50%, color-mix(in srgb, var(--nh-a) 22%, #fff) 100%);
  position: relative;
}

.ec-frame {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  overflow: hidden;
}

.ec-frame-main {
  width: 110px;
  height: 110px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 7px solid #fff;
}

.ec-frame-inner-orange {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--nh-a), color-mix(in srgb, var(--nh-a) 45%, #fff));
}

.ec-frame-small {
  width: 62px;
  height: 62px;
  top: 50px;
  left: 24px;
  border: 5px solid #fff;
  transform: rotate(-8deg);
}

.ec-frame-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--nh-d), color-mix(in srgb, var(--nh-a) 70%, #fff));
  position: relative;
}

.ec-mountain {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 30px;
  height: 18px;
  background: var(--nh-d);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.ec-sun {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
}

.ec-bubble {
  position: absolute;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
}

.ec-heart {
  width: 44px;
  height: 36px;
  top: 24px;
  right: 42px;
  background: var(--nh-a);
  font-size: 16px;
}

.ec-dots {
  width: 42px;
  height: 32px;
  top: 70px;
  right: 22px;
  background: var(--nh-d);
  font-size: 15px;
  letter-spacing: 2px;
}

.ec-ig {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--nh-a), var(--nh-d));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

/* Right card */
.ec-right {
  background: linear-gradient(160deg, var(--nh-f) 0%, var(--nh-s) 55%, color-mix(in srgb, var(--nh-a) 30%, #fff) 100%);
  position: relative;
}

.ec-blob {
  position: absolute;
  border-radius: 50%;
}

.ec-b1 { width: 90px; height: 90px; background: var(--nh-a); top: -20px; left: -25px; opacity: 0.7; }
.ec-b2 { width: 65px; height: 65px; background: var(--nh-d); bottom: 15px; right: -12px; opacity: 0.75; }
.ec-b3 { width: 50px; height: 50px; background: color-mix(in srgb, var(--nh-a) 55%, #fff); top: 30px; right: 30px; opacity: 0.7; }
.ec-b4 { width: 40px; height: 40px; background: color-mix(in srgb, var(--nh-a) 30%, #fff); bottom: 40px; left: 22px; opacity: 0.65; }

/* Shared */
.ec-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.ec-tag {
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
}

.ec-card-content {
  padding: 16px 4px 4px;
}

.ec-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 7px;
  line-height: 1.4;
}

.ec-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.2px;
}

.ec-title a {
  color: inherit;
  text-decoration: none;
}

.ec-title a:hover {
  text-decoration: underline;
}

.ec-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: #666;
  margin: 8px 0 0;
}

/* Pagination — not in the supplied design, but required so multi-page
   post lists aren't unstyled/broken. Kept minimal and off to the side. */
.ec-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}

.ec-pagination a,
.ec-pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
}

.ec-pagination .current {
  background: var(--nh-a);
  color: #fff;
}

/* Our Blog */
.spb-top-text {
  width: 100%;
  text-align: center !important;
  padding: 10px 15px 24px;
}

.spb-top-text h2,.spb-top-text h1 {
  width: 100%;
  margin: 0 auto !important;
  font-family: 'Baloo 2', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center !important;
  display: block;
  position: relative;
  float: none !important;
}

.spb-top-text h2::after,.spb-top-text h1::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, var(--nh-d), color-mix(in srgb, var(--nh-a) 55%, #fff));
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== Single post ===== */

.ec-single-root {
  padding: 20px 0 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ec-single-root *,
.ec-single-root *::before,
.ec-single-root *::after {
  box-sizing: border-box;
}

.ec-single {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Reuse the grid's hero backgrounds/art but at banner proportions
   instead of card-thumbnail proportions. */
.ec-single-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 24px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .ec-single-hero {
    aspect-ratio: 16 / 10;
    border-radius: 18px;
  }

  .ec-single-title {
    font-size: 28px;
  }
}

.ec-single-content {
  padding: 32px 4px 0;
}

.ec-single-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 6px 0 24px;
}

.ec-single-body {
  font-size: 17px;
  line-height: 1.75;
  color: #333;
}

.ec-single-body p {
  margin: 0 0 22px;
}

.ec-single-body h2,
.ec-single-body h3,
.ec-single-body h4 {
  font-family: 'Baloo 2', sans-serif;
  color: var(--ink);
  margin: 36px 0 16px;
}

.ec-single-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.ec-single-body a {
  color: var(--nh-a);
  text-decoration: underline;
}

.ec-single-body blockquote {
  margin: 24px 0;
  padding: 4px 20px;
  border-left: 4px solid var(--nh-a);
  color: #555;
  font-style: italic;
}

.ec-single-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.ec-single-back a {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.ec-single-back a:hover {
  text-decoration: underline;
}

.ec-single-comments {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.ec-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.ec-share-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-right: 2px;
}

.ec-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ec-share-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.ec-share-x {
  background: #000;
  min-width: 36px;
  padding: 0;
  width: 36px;
}

.ec-share-facebook {
  background: #1877f2;
  min-width: 36px;
  padding: 0;
  width: 36px;
  font-style: italic;
}

.ec-share-linkedin {
  background: #0a66c2;
  min-width: 36px;
  padding: 0;
  width: 36px;
}

.ec-share-copy {
  background: var(--nh-a);
  padding: 0 16px;
}

.ec-share-copied {
  background: var(--nh-d);
}

.ec-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ec-related {
  width: 100%;
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 40px 20px 0;
  border-top: 1px solid #eee;
}

.ec-related-title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 24px;
  text-align: center;
}

.ec-related-grid {
  max-width: 1100px;
  margin: 0 auto;
}

/* Featured image, when a post has one — replaces the decorative
   illustration inside the same hero box on both the grid card and
   the single-post hero. */
.ec-featured-image {
  position: absolute;
  inset: 0;
}

.ec-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== NHIS integration (added) ===== */
html{scroll-behavior:smooth}
body.nhnw-body #main-content{background:#fff}
.nhnw.ec-blog-root{padding:150px 24px 0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:#222;line-height:1.5;-webkit-font-smoothing:antialiased}
.nhnw.ec-blog-root.ec-single-root{padding:130px 0 0}
.nhnw{--nh-a:#BD648B;--nh-d:#8f3d63;--nh-s:#f6e0eb;--nh-f:#fdf3f8;--ink:#231F20}
.nhnw,.nhnw *,.nhnw *::before,.nhnw *::after{box-sizing:border-box}
.nhnw h1,.nhnw h2,.nhnw h3,.nhnw p{padding:0}
.nhnw [hidden]{display:none!important}
.nhnw a{text-decoration:none}
.nhnw .ec-featured-image img{width:100%!important;height:100%!important;max-width:none;object-fit:cover;display:block}
.nhnw .ec-card-image{text-decoration:none}
.nhnw .ec-title,.nhnw .ec-excerpt,.nhnw .ec-meta{text-transform:none}
.nhnw .ec-title{font-family:inherit}
.nhnw .ec-single-title{margin:6px 0 24px;text-transform:none}
.nhnw .ec-single-body a{color:var(--nh-a);text-decoration:underline}
.nhnw .ec-single-body ul,.nhnw .ec-single-body ol{margin:0 0 22px;padding-left:1.4em;list-style:revert}
.nhnw .ec-single-body li+li{margin-top:.4em}
.nhnw .ec-single-body figure{margin:0 0 22px}
.nhnw .ec-single-body figcaption{margin-top:8px;text-align:center;font-size:14px;color:#888}
.nhnw .ec-single-body iframe,.nhnw .ec-single-body video{max-width:100%;border-radius:16px}
.nhnw .ec-single-body table{display:block;overflow-x:auto;border-collapse:collapse;font-size:16px}
.nhnw .ec-single-body td,.nhnw .ec-single-body th{padding:10px 14px;border:1px solid #eee}
.nhnw .ec-single-body{overflow-wrap:anywhere}
.nhnw .ec-single-body img{height:auto!important}
.nhnw .ec-single-hero .ec-featured-image{border-radius:inherit}
.nhnw .ec-pagination button{font:inherit;font-size:13px;padding:6px 12px;border:0;border-radius:8px;background:transparent;color:#333;cursor:pointer}
.nhnw .ec-pagination button:hover{background:#f4f4f4}
.nhnw .ec-pagination button.current{background:var(--nh-a);color:#fff;cursor:default}
.nhnw .ec-empty{text-align:center;color:#888;padding:48px 16px}
.nhnw .ec-card{transition:transform .25s ease}
.nhnw .ec-card:hover{transform:translateY(-4px)}
.nhnw .ec-share-btn{text-decoration:none!important}
.nhnw .ec-sub{max-width:1200px;margin:56px auto 0;padding:0 0 80px}
.nhnw .ec-sub__box{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;padding:36px 40px;border-radius:24px;background:linear-gradient(145deg,var(--nh-s) 0%,var(--nh-f) 50%,color-mix(in srgb,var(--nh-a) 22%,#fff) 100%)}
.nhnw .ec-sub__box h2{margin:0;font-family:'Baloo 2',sans-serif;font-size:26px;font-weight:800;color:var(--ink);line-height:1.2}
.nhnw .ec-sub__box p{margin:6px 0 0;color:#555;font-size:15px;max-width:460px}
.nhnw .ec-sub__btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 28px;border:0;border-radius:999px;background:var(--nh-a);color:#fff;font:700 15px inherit;font-family:inherit;cursor:pointer;transition:opacity .15s,transform .15s}
.nhnw .ec-sub__btn:hover{opacity:.88;transform:translateY(-1px)}
.nhnw .ec-single-root .ec-sub{padding-left:20px;padding-right:20px}
@media (max-width:768px){
 .nhnw.ec-blog-root{padding:112px 16px 0}
 .nhnw.ec-blog-root.ec-single-root{padding:104px 0 0}
 .nhnw .spb-top-text h2,.nhnw .spb-top-text h1{font-size:32px}
 .nhnw .ec-sub__box{padding:28px 24px}
 .nhnw .ec-sub__btn{width:100%}
 .nhnw .ec-related-grid{max-width:420px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.nhnw .ec-card{transition:none}}
