:root {
  --edb-fe-border: #C9C8CD;
  --edb-text: #464353;
  --edb-subtitle: #F16461;
}

.edb-fe{ --gap: 24px; }
.edb-fe__header{
   align-items:center; margin-bottom: 24px;
}
.edb-fe__desc_wrapper {
  display:grid; grid-template-columns: 320px 1fr auto; gap: var(--gap);
  border-top: 1px solid var(--edb-fe-border);
}

.edb-fe__desc_wrap {
  position: relative;
}
.edb-fe__intro {
  position: relative; 
  padding-bottom: 40px;
  margin-bottom: 20px;
}
.edb-fe__brand {
  padding-right: 40px;
  padding-top: 40px;
}
.edb-fe__brand img{ max-width:280px; height: 200px; object-fit: contain; display:block; }
[data-logoslug^="waikato"] img{ max-width:280px; height: 200px; object-fit: contain; display:block; }
.edb-fe__title{ text-align: center; margin:0 auto 8px auto; padding-bottom: 40px; font-size:clamp(28px,3.2vw,48px); font-weight: 700; font-family: 'Poppins'; }
.edb-fe__subtitle{ text-align: center; margin:0 auto 8px auto; font-size:clamp(22px,2.8vw,36px); font-family: 'Lemon Tuesday'; color: var(--edb-subtitle);}
.edb-fe__desc{ margin:0; padding: 40px; padding-right: 0; color: var(--edb-text); line-height: 24px; font-size: 15px; border-left: 1px solid var(--edb-border); }

.edb-fe__picker{ position:absolute; top:0; right: 0; }
.edb-fe__pickbtn{
  display:flex; align-items:center; gap:10px; border:1px solid #dfe3e8; background:#fff; padding:10px 14px; border-radius:12px; cursor:pointer;
}
.edb-fe__picklist{
  position:absolute; z-index: 3; right:0; top:calc(100% + 6px); background:#fff; border:1px solid #e6e6e6; border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.12); padding:6px !important; min-width:320px; max-height:60vh; overflow:auto; list-style:none; margin:0;
}
.edb-fe__picklist li{
  display:flex; justify-content: space-between; align-items:center; gap:10px; padding:8px 10px; border-bottom: 1px solid var(--edb-border); cursor:pointer;
}
.edb-fe__picklist li:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.edb-fe__picklist li:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom: none;
}
.edb-fe__picklist li:hover{ background:#f6f7f9; }
.edb-fe__picklogo{ width:80px; height:40px; object-fit:contain; margin-right: 15px; }
.edb-fe__picklist span {
    line-height: 35px;
    font-weight: 600;
    display: inline-block;
    font-family: 'Poppins';
    height: 100%;
    margin-left: 10px;
    color: #3F3D56;
}

.edb-fe__grid{
  display:grid; gap: var(--gap);
  grid-template-columns: repeat(4, minmax(0,1fr));
}

.edb-fe__divider {
  position: absolute;
  bottom: 0;
  right: -13px;
  width: 1px;
  height: 250px;
  background: #f2f2f2;
}


@media (min-width:1200px){ .edb-fe__card:nth-child(4n) .edb-fe__divider { display: none;} }
@media (max-width:1200px){ .edb-fe__grid{ grid-template-columns: repeat(3,1fr);} .edb-fe__card:nth-child(3n) .edb-fe__divider { display: none;} }
@media (max-width:900px){  .edb-fe__grid{ grid-template-columns: repeat(2,1fr);} .edb-fe__header{ grid-template-columns: 1fr; } .edb-fe__card:nth-child(2n) .edb-fe__divider { display: none;} }
@media (max-width:600px){  .edb-fe__grid{ grid-template-columns: 1fr; } .edb-fe__divider { display: none;} }

.edb-fe__card{
 text-align:center; background:#fff;
 position: relative;
 padding: 15px;
 padding-bottom: 0;
}
.edb-fe__photo{ margin-bottom:12px; }
.edb-fe__photo img{ width:100%; aspect-ratio: 1 / 1; object-fit:cover; border-radius:999px; filter:grayscale(100%); transition:filter .2s ease; }
.edb-fe__card:hover .edb-fe__photo img{ filter:none; }
.edb-fe__name{ margin:22px 0 2px; text-decoration: none; color: #000;  font-size: 26px; font-family: 'Poppins';font-weight: 700; }
.edb-fe__name a{ color: #000; text-decoration: none; }
.edb-fe__name a:hover{ color: #333; text-decoration: none; }
.edb-fe__brandtag{ color:#e76f51; font-weight:700; font-size:12px; }
.edb-fe__loc{ color: var(--edb-subtitle); font-size:15px; font-weight: 600; line-height: 28px; }
.edb-fe__blurb{ color:#4b5563; font-size:14px; line-height:2.0; margin-top:8px; padding: 0 10px; }

.edb-fe__pager{ display:flex; gap:8px; justify-content:flex-end; margin-top:18px; }
.edb-fe__page{ display:inline-flex; justify-content:center; align-items:center; border:1px solid #e6e6e6; border-radius:8px; width: 40px;
    font-weight: 600;
    text-decoration: none;
    height: 40px; }
.edb-fe__page.is-active{ background:#333; color:#fff; border-color:#333; }
.theme-fading {
  transition: background-color .3s, color .3s;
  opacity: .7;
}
/* Region card */
.edb-fe__region{  display:inline-block; --edb-region-w: 260px; }
.edb-fe__regionbtn{
  width:var(--edb-region-w);
  display:flex; align-items:center; justify-content:center;
  gap:12px; padding:24px 16px;
  background:#fff; border:2px solid #C9CBD3; border-radius:18px;
  box-shadow:0 1px 0 rgba(16,24,40,.02);
  cursor:pointer; transition:border-color .15s ease, box-shadow .15s ease;
}
.edb-fe__regionbtn:hover{ border-color:#B7BAC4; box-shadow:0 4px 10px rgba(16,24,40,.14); }
.edb-fe__regionbtn:focus-visible{ outline:3px solid #A7D3FF; outline-offset:2px; }

.edb-fe__regiontiny{ display:block; font-size:12px; line-height:1; color:#9AA0AE; margin-bottom:6px; }
.edb-fe__regionname{ display:block; font-size:24px; font-family: 'Poppins'; line-height:1.1; color:#3F3D56; font-weight:600; }
.edb-fe__pin{ flex:0 0 auto; opacity:.75; margin-left: 15px; margin-right: -20px; }

/* Dropdown */
.edb-fe__regionmenu{
  position:absolute; top:100%; left:0; min-width:var(--edb-region-w);
  margin-top:8px; padding:6px;
  background:#fff; border:1px solid #E5E7EB; border-radius:12px;
  box-shadow:0 14px 30px rgba(0,0,0,.08); z-index:50;
  max-height:320px; overflow:auto;
}
.edb-fe__regionopt{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:10px; cursor:pointer;
}
.edb-fe__regionopt:hover{ background:#F8FAFC; }
.edb-fe__regionopt[aria-selected="true"]{ background:#F2F4F7; }
.edb-fe__rlogo{ height:18px; width:auto; object-fit:contain; }

.edb-fe__gridwrap{ transition: opacity .25s ease; }
.edb-fe__gridwrap.is-fading-out{ opacity: 0; }



/* Fades */
.edb-fe__gridwrap,
.edb-fe__regionlogo,
.edb-fe__desc { transition: opacity .25s ease; }
.edb-fe__gridwrap.is-fading-out { opacity: 0; }

/* Wrappers must be positioning contexts, with stable min-height to reduce jump */
.edb-fe__logo-wrap,
.edb-fe__desc-wrap { position: relative; }
.edb-fe__logo-wrap { min-height: 40px; display:flex; align-items:center; gap:10px; }
.edb-fe__desc-wrap { min-height: 54px; }

/* Loading state: hide real content; show overlay skeletons without reflow */
.edb-fe__meta.is-loading .edb-fe__regionlogo,
.edb-fe__meta.is-loading .edb-fe__desc { opacity: 0; visibility: hidden; }
.skel-stack { position: absolute; inset: 0; display: none; }
.edb-fe__meta.is-loading .skel-stack { display: block; }

/* Skeleton base + shimmer */
.skel { background:#eef1f5; border-radius:8px; position:relative; overflow:hidden; }
.skel::after{
  content:""; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
  animation: skel-shimmer 1.2s infinite;
}
@keyframes skel-shimmer { 100% { transform: translateX(100%); } }

/* Skeleton sizes */
.skel--logo { width:180px; height:40px; border-radius:6px; }
.skel--text { display:block; height:14px; margin-top:8px; border-radius:6px; width:100%; max-width:680px; }
.skel--text.skel--short { max-width:420px; }

/* Skeleton GRID */
.edb-fe__grid.is-skeleton {
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:18px;
}
@media (max-width:900px){ .edb-fe__grid.is-skeleton { grid-template-columns:1fr; } }

.edb-skel-card { padding:12px; border:1px solid #eef1f5; border-radius:14px; background:#fff; }
.edb-skel-img  { width:100%; aspect-ratio:4/3; border-radius:12px; margin-bottom:10px; }
.edb-skel-line { height:14px; border-radius:8px; background:#eef1f5; position:relative; overflow:hidden; }
.edb-skel-line + .edb-skel-line { margin-top:8px; }
.edb-skel-line::after{
  content:""; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
  animation: skel-shimmer 1.2s infinite;
}

@media (max-width:600px){
  .edb-fe__desc_wrapper {
    display: block;
  }

  .edb-fe__desc {
    border-left: none !important;
    padding: 0 !important;
  }
  
  .edb-fe__picker {
    position: relative;    
    width: 100%;
  }
  .edb-fe__regionbtn {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* Clamp only when collapsed (and not while measuring) */
.edb-fe__desc { --lines: 25; --fade-bg: #fff; font-family: 'Poppins'; line-height: 1.7em; font-size: 16px; font-weight: 400; }
.edb-fe__desc.is-collapsed:not(.is-measuring) .edb-collapsible__content{
  display:-webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  overflow:hidden;
  position:relative;
}
.edb-fe__desc.is-collapsed:not(.is-measuring) .edb-collapsible__content::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:3em;
  background:linear-gradient(to bottom, color-mix(in srgb, var(--fade-bg) 0%, transparent), var(--fade-bg));
  pointer-events:none;
}

/* Button + label swap */
.edb-collapsible__btn-wrap{ margin-top:.75rem; text-align:center; }
.edb-collapsible__btn{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.6rem 1.1rem; border-radius: 15px; cursor: pointer; transition: all 0.2s ease-in-out;
  background:#fff; border:2px solid rgba(0,0,0,0.2); color:#6b7280; font-weight:500; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; font-family: 'Poppins';
}
.edb-collapsible__btn:hover {
  background: #eee;
}
.edb-fe__desc.is-collapsed  .edb-collapsible__btn .less{ display:none; }
.edb-fe__desc:not(.is-collapsed) .edb-collapsible__btn .more{ display:none; }

.edb-collapsible__btn-small {
  max-width: 100px;
  background: rgba(255,255,255,0.4);
  padding: .4rem .8rem;
  font-size: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.2);
}

/* Container */
.edb-vt-section { margin: 2rem 0 2.5rem; background: #d9f2f8; border-radius: 0.8rem; padding: 2rem; }
.edb-vt-header { margin: 0 0 1rem; }
.edb-vt-title  { margin: 0; font-size: 1.6rem; line-height: 1.2; }

/* Grid (mobile-first) */
.edb-vt-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.edb-vt-grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.edb-vt-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.edb-vt-grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.edb-vt-grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.edb-vt-grid.cols-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }


/* Card */
.edb-vt-card {
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edb-vt-card--single {
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

/* Thumb */
.edb-vt-thumb { position: relative; width: 160px;  }
.edb-vt-img {
  width: 160px;
  max-width: 160px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.edb-vt-thumb--placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #f5f7f9;
}

/* Name */
.edb-vt-name { margin: .2rem 0 .2rem; font-size: 1.05rem; line-height: 1.3; }

/* Blurb (clamp by default) */
.edb-vt-blurb {
  font-size: 14px;
  font-family: 'Poppins';
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 2;        /* clamp lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.edb-vt-blurb--single {
  font-size: 14px;
  font-family: 'Poppins';
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* clamp lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

/* Expanded state toggled by JS: add .is-open to the blurb */
.edb-vt-blurb.is-open {
  -webkit-line-clamp: unset;
  max-height: none;
}
.edb-vt_name {
  font-size: 17px;
}
.edb-vt_name--single {
  font-size: 23px;
}

/* Expand button */
.edb-vt-expand {
  align-self: flex-start;
  appearance: none;
  border: 1px solid #d5e3ea;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.2;
}
.edb-vt-expand:hover { background: #f6fafc; }
.edb-vt-expand[aria-expanded="true"] { background: #f0f7fb; }

/* Single layout */
.edb-vt-section.is-single .edb-vt-single {
  display: block; /* container for your single row */
}


.edb-edu__hero,
.edb-edu__hero_mobile {
  max-width: 340px;
  max-height: 340px;
}

.edb-edu__heroimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; 
  display: block;
}

.edb-vt-card--single {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.edb-vt-thumb--single { margin-right: 20px; }        /* image column width */
.edb-vt-body--single  { flex: 1 1 auto; min-width: 0; }

@media (max-width: 800px) {
  .edb-vt-card--single { flex-direction: column; }
  .edb-vt-thumb--single { flex-basis: auto; width: 100%; }
}
@media (max-width: 900px) {
  .edb-vt-grid.cols-3,
  .edb-vt-grid.cols-4,
  .edb-vt-grid.cols-5,
  .edb-vt-grid.cols-6 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .edb-vt-section:not(.edb-vt-section--single) {
    padding: 1.5rem;
    margin-left: -36px;
    margin-right: -36px;
    border-radius: 0;
  }
  .edb-vt-section { grid-template-columns: 1fr; }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-thumb { position: relative; width: 90px;  }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-img {
    width: 90px;
    max-width: 90px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
  }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt_name {
    font-size: 14px;
  }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-blurb {
    font-size: 12px;
  }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-title {
    font-size: 1.4rem;
  }
  .edb-vt-section:not(.edb-vt-section--single) .edb-vt-card {
    gap: 0px;
    padding: 5px;
  }
}
