/* AVADA KEDAVRA | CORPO DOCENTE | COMPOSICAO RESPONSIVA V8
   Nunca mover/transformar a moldura; a arte e o retrato compartilham o mesmo
   stage proporcional e a fotografia fica presa à abertura interna real. */
.ak8-faculty-page { overflow-x: clip; }
.ak8-faculty-page .ak8-frame-root,
.ak8-frame-root {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  line-height: normal;
}
.ak8-faculty-page .ak8-frame-scale,
.ak8-frame-root .ak8-frame-scale {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
}
.ak8-faculty-page .ak8-frame-stage,
.ak8-frame-root .ak8-frame-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1122 / 1402;
  height: auto;
  overflow: hidden;
  isolation: isolate;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,.4));
  transform: none !important;
}
.ak8-faculty-page .ak8-photo-aperture,
.ak8-frame-root .ak8-photo-aperture {
  position: absolute;
  z-index: 1;
  /* Limites conservadores do vão INTERNO das quatro molduras de 1122x1402.
     Não confundir com o vão transparente exterior dos ornamentos. */
  left: 24.5%; right: 24.5%;
  top: 30.4%; bottom: 25.2%;
  margin: 0;
  overflow: hidden !important;
  border-radius: 3px;
  display: block;
  background: linear-gradient(145deg,#141820,#090b0d);
  clip-path: inset(0);
}
.ak8-faculty-page .ak8-photo-aperture > img.ak8-portrait-image,
.ak8-frame-root .ak8-photo-aperture > img.ak8-portrait-image {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  object-position: center;
  border-radius: 0 !important;
  filter: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform-origin: center !important;
}
.ak8-faculty-page .ak8-art-overlay,
.ak8-frame-root img.ak8-art-overlay {
  position: absolute !important;
  z-index: 2;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  object-position: center center !important;
  opacity: 1;
  margin: 0 !important;
  padding: 0 !important;
  filter: none !important;
  transform: none !important;
  pointer-events: none;
}
.ak8-frame-root .ak8-image-placeholder {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: #e6cca2;
}
.ak8-frame-root .ak8-image-placeholder svg { width: 38%; max-height: 76px; opacity: .5; }
.ak8-frame-root .ak8-image-placeholder span { font: 10px/1.5 Georgia,serif; letter-spacing: .12em; padding: 0 8px; }
.ak8-frame-root .ak8-plain-frame {
  position: absolute; inset: 0; z-index: 2;
  border: 16px ridge #94734b;
  box-shadow: inset 0 0 0 3px #2f2217;
  pointer-events: none;
}
/* Um limite ESTÁVEL, independente de altura do card, tela ou biografia. */
.ak8-faculty-page .ak8-director { max-width: 360px; }
.ak8-faculty-page .ak8-professor { max-width: 295px; }
.ak8-preview { width: min(240px,100%); max-width: 100%; }
.ak8-preview .ak8-frame-root, .ak8-preview .ak8-frame-scale { max-width: 100%; }

/* Direção: quadro aristocrático e texto com espaço próprio. */
.ak8-faculty-page .ak2-director-profile {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(24px,4vw,66px);
  align-items: center;
  margin: 0 0 90px;
}
.ak8-faculty-page .ak2-director-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: clamp(12px,2.4vw,26px) 12px;
  background: radial-gradient(ellipse at 50% 35%,#26312f33,transparent 70%),#0d1015;
  overflow: hidden !important;
  border: 1px solid #bca47b3e;
}
.ak8-faculty-page .ak2-director-copy { min-width: 0; }
.ak8-faculty-page .ak2-director-copy h2 {
  font-size: clamp(48px,5.6vw,84px);
  line-height: 1.02;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.ak8-faculty-page .ak2-director-copy p { max-width: 55ch; }

/* Corpo docente: cards equilibrados, sem extensas faixas vazias à esquerda. */
.ak8-faculty-page .ak2-professors-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: start;
  gap: 22px;
}
.ak8-faculty-page .ak2-professor-card {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  min-height: 0 !important;
  align-self: start;
  overflow: hidden !important;
  background: linear-gradient(180deg,#15181f,#101318);
}
.ak8-faculty-page .ak2-professor-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100%;
  overflow: hidden !important;
  padding: 14px 14px 4px;
  background: radial-gradient(ellipse at 50% 43%,#ac946b20,transparent 67%),#11151b;
}
.ak8-faculty-page .ak2-professor-details {
  padding: clamp(21px,3vw,30px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ak8-faculty-page .ak2-professor-details h3 {
  font-size: clamp(35px,3.8vw,55px);
  line-height: 1.05;
  margin: 6px 0 14px;
  overflow-wrap: anywhere;
}
.ak8-faculty-page .ak2-professor-details > p { max-width: 60ch; }
.ak8-faculty-page .ak2-professor-position { margin-top: 10px; padding-top: 16px; }

/* Ajustes do gabinete administrativo (mesmo componente de visualização). */
.ak8-editor-preview { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; align-items: center; margin: 12px 0 20px; padding: 18px; background: #0e1218; border: 1px solid #bca47b48; }
.ak8-drag-surface { width: min(270px,100%); max-width: 100%; touch-action: none; user-select: none; -webkit-user-select:none; cursor: grab; }
.ak8-drag-surface:active { cursor: grabbing; }
.ak8-drag-surface img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.ak8-editor-help { max-width: 260px; font: 12px/1.7 Arial,sans-serif; color: #c6bdae; }
.ak8-editor-help strong { display: block; color: #e4d6c0; margin-bottom: 6px; }
.ak8-editor-controls { border: 1px solid #bca47b45; padding: 16px; background: #10141a; margin: 12px 0 20px; }
.ak8-editor-controls-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 18px; margin-top: 12px; }
.ak8-editor-controls-grid label { display:flex; flex-direction:column; gap:8px; }
.ak8-editor-range { display:flex; align-items:center; gap:10px; }
.ak8-editor-range input { flex: 1; min-width: 0; accent-color:#d1a96b; }
.ak8-editor-range output { width: 46px; text-align:right; color:#dfc7a0; }
.ak8-editor-controls .ak8-editor-hint { font: 12px/1.6 Arial,sans-serif; color:#b9b1a6; margin: 14px 0; }

@media (max-width: 950px) {
 .ak8-faculty-page .ak2-director-profile { grid-template-columns: 1fr; gap: 24px; }
 .ak8-faculty-page .ak8-director { max-width: 320px; }
 .ak8-faculty-page .ak2-director-copy { max-width: 680px; }
}
@media (max-width: 1000px) {
 .ak8-faculty-page .ak2-professors-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
 .ak8-faculty-page .ak2-professors-grid { grid-template-columns: 1fr; gap: 22px; }
 .ak8-faculty-page .ak2-director-visual { padding: 10px 6px; }
 .ak8-faculty-page .ak8-director { max-width: min(288px,88vw); }
 .ak8-faculty-page .ak8-professor { max-width: min(270px,84vw); }
 .ak8-faculty-page .ak2-professor-portrait { padding: 10px 8px 0; }
 .ak8-faculty-page .ak2-director-copy h2 { font-size: clamp(46px,12vw,69px); }
 .ak8-faculty-page .ak2-professor-details h3 { font-size: clamp(35px,9.5vw,49px); }
 .ak8-editor-controls-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
 .ak8-faculty-page .ak8-director { max-width: 250px; }
 .ak8-faculty-page .ak8-professor { max-width: 238px; }
}
@media (prefers-reduced-motion: reduce) { .ak8-faculty-page *, .ak8-frame-root * { transition: none !important; } }
