/* EZKlass Connect — Faculty grid.
   Default layout mirrors a classic school faculty directory: 2-up, 180px square photo on
   the left, mauve name (Hind 24/600) + title, inline bio, animated "Education"
   disclosure, thin separator per row. Body copy inherits the theme body font. */
.ezk-faculty {
  --ezk-primary:   #385E7C;
  --ezk-secondary: #A8516C;
  --ezk-text:      #3C4645;
  --ezk-muted:     #8a8f93;
  --ezk-line:      #F5C7D5;  /* Elementor global "blossom" (e-global-color-20ded94) */
  --ezk-paleblue:  #D4E0EB;
  --ezk-blossom:   #F5C7D5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 60px;
  row-gap: 0;
  color: var(--ezk-text);
}
.ezk-faculty.ezk-cols-1 { grid-template-columns: 1fr; }
.ezk-faculty.ezk-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ezk-faculty.ezk-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* (mobile rules live at the end of this file so they win the cascade) */

.ezk-fac-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 26px 0;
}

.ezk-fac-photo {
  flex: 0 0 180px;
  width: 180px;
  height: 180px;
  overflow: hidden;
  background: #eef2f5;
}
.ezk-fac-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ezk-fac-photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 700; color: #fff; text-transform: uppercase;
  background: linear-gradient(160deg, var(--ezk-paleblue), var(--ezk-blossom));
}

.ezk-fac-body { flex: 1 1 auto; min-width: 0; }

/* Elevated specificity so the theme's global h3 kit typography (40px/300) doesn't win. */
.ezk-faculty .ezk-fac-card .ezk-fac-name {
  margin: 0 0 3px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ezk-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* let the mail icon drop rather than widen the card */
  gap: 8px;
  overflow-wrap: anywhere;  /* very long names can break instead of clipping */
  text-decoration: none !important;
}
.ezk-faculty .ezk-fac-card .ezk-fac-name:hover,
.ezk-faculty .ezk-fac-card .ezk-fac-name a:hover { text-decoration: none !important; }
.ezk-fac-mail { color: var(--ezk-secondary); display: inline-flex; opacity: .85; transition: opacity .15s; text-decoration: none !important; }
.ezk-fac-mail:hover { opacity: 1; }
.ezk-fac-mail-ic { display: block; }

.ezk-fac-title { color: var(--ezk-secondary); font-size: .95rem; font-weight: 300; margin-bottom: 12px; }
.ezk-fac-dept  { color: var(--ezk-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }

.ezk-fac-bio { color: var(--ezk-text); font-size: .9rem; line-height: 1.55; }
.ezk-fac-bio p { margin: 0 0 .6em; }
.ezk-fac-bio p:last-child { margin-bottom: 0; }

/* Animated Education disclosure */
.ezk-fac-edu { margin-top: 14px; }
/* Hard-reset so the theme's <button> styling (border/padding/uppercase/bg) can't
   turn this into a CTA — it's a plain mauve text toggle like the original. */
.ezk-faculty .ezk-fac-edu .ezk-fac-edu-toggle {
  -webkit-appearance: none; appearance: none;
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ezk-line) !important;  /* full-width rule below Education — always visible */
  outline: none !important;              /* kill the blue focus ring/box on click */
  -webkit-tap-highlight-color: transparent;
  border-radius: 0 !important;
  padding: 0 0 10px !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--ezk-secondary) !important;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ezk-faculty .ezk-fac-edu .ezk-fac-edu-toggle:hover { background: none !important; color: var(--ezk-blossom) !important; }
.ezk-fac-edu-text { flex: 0 0 auto; }
.ezk-fac-edu-caret::before { content: "\25BE"; font-size: .8em; display: inline-block; transition: transform .3s ease; }
.ezk-fac-edu.is-open .ezk-fac-edu-caret::before { transform: rotate(180deg); }
.ezk-fac-edu-panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.ezk-fac-edu-inner { padding-top: 8px; font-size: .86rem; line-height: 1.55; color: #55605c; }
.ezk-fac-edu-inner p { margin: 0 0 .5em; }
.ezk-fac-edu-inner p:last-child { margin-bottom: 0; }

.ezk-faculty--empty { text-align: center; color: var(--ezk-muted); padding: 40px 0; font-style: italic; }

/* ── Mobile ────────────────────────────────────────────────────────────────
   Single column, and the photo steps down to 160px — the same breakpoint and
   size the original listing template used (@media max-width:767px{--width:160px}).
   The photo is non-shrinkable, so the gap and name also step down; otherwise the
   card overflows its column on a ~390px screen (measured: 347px card in a 330px
   column before this).
   NOTE: these must stay at the END of the file — they share specificity with the
   base rules above, so they only win by source order. */
@media (max-width: 767px) {
  /* Original mobile layout: STAYS 2-up, and each card stacks vertically —
     square photo on top (fills the column), then name, mail icon, title, bio.
     (The mail icon drops to its own line via flex-wrap on the name, as it does
     on the live site.) */
  .ezk-faculty { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
  .ezk-fac-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 0;
  }
  .ezk-fac-photo {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .ezk-faculty .ezk-fac-card .ezk-fac-name { font-size: 19px; margin: 14px 0 4px; }
  .ezk-fac-title { font-size: .85rem; margin-bottom: 10px; }
  .ezk-fac-bio { font-size: .8rem; }
  .ezk-fac-edu { margin-top: 12px; }
}
