/* Câmara Mirim — v1.1.0 | Apresentação pública (escopo isolado do tema) */
.cmsm {
  --cmsm-navy:#142f4b;
  --cmsm-deep:#0b223a;
  --cmsm-blue:#215574;
  --cmsm-teal:#20708a;
  --cmsm-ink:#263b50;
  --cmsm-muted:#63758a;
  --cmsm-line:#dce5ec;
  --cmsm-soft:#f3f7fa;
  box-sizing:border-box;
  position:relative;
  left:50%;
  transform:translateX(-50%);
  width:min(1120px,calc(100vw - 36px));
  max-width:none;
  margin:-12px 0 66px;
  padding:0;
  font-family:inherit;
  color:var(--cmsm-ink);
  line-height:1.6;
  font-size:16px;
}
.cmsm *, .cmsm *::before, .cmsm *::after {box-sizing:border-box}
.cmsm a {text-decoration:none}
.cmsm a:focus-visible {outline:3px solid #e5ae50;outline-offset:3px}
.cmsm h1,.cmsm h2,.cmsm h3 {font-family:inherit;line-height:1.2;color:var(--cmsm-navy);margin:0}
.cmsm h1 {font-size:clamp(30px,4vw,47px);font-weight:800}
.cmsm h2 {font-size:clamp(22px,2.8vw,29px);font-weight:750}
.cmsm h3 {font-size:19px;font-weight:700}
.cmsm p {margin:0 0 14px}

/* Abertura: não duplica o título da faixa de navegação do tema */
.cmsm-hero {
  position:relative;
  overflow:hidden;
  min-height:288px;
  display:flex;
  align-items:center;
  padding:42px clamp(26px,5vw,64px);
  border-radius:17px;
  color:#fff;
  background:linear-gradient(110deg,#0f2a45 0%,#194360 65%,#1d526b 100%);
  box-shadow:0 10px 30px rgba(15,43,69,.1);
}
.cmsm-hero::before {
  content:"";
  position:absolute;
  top:-190px;right:-96px;
  width:490px;height:490px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 0 0 60px rgba(255,255,255,.033),0 0 0 125px rgba(255,255,255,.025);
  pointer-events:none;
}
.cmsm-hero::after {
  content:"";
  position:absolute;
  inset:auto -10px 0 48%;
  height:80px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.025));
  pointer-events:none;
}
.cmsm-hero-photo {background-size:cover;background-position:center}
.cmsm-hero-content {max-width:735px;position:relative;z-index:1}
.cmsm-kicker {display:inline-block;color:#bddde9;font-size:12px;font-weight:750;letter-spacing:.115em;text-transform:uppercase}
.cmsm-hero h1 {color:#fff;font-size:clamp(36px,4.8vw,55px);line-height:1.05;margin:15px 0 13px;font-weight:800}
.cmsm-hero p {max-width:635px;color:#e8f1f6;font-size:clamp(16px,1.7vw,19px);line-height:1.52;margin:0}
.cmsm-hero-tags {display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}
.cmsm-hero-tags:empty {display:none}
.cmsm-hero-tags span {border:1px solid rgba(228,242,249,.5);border-radius:20px;padding:3px 12px;color:#fff;font-size:12px;font-weight:650}
.cmsm-hero-actions {display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-top:26px}
.cmsm-hero-actions a {display:inline-flex;align-items:center;gap:12px;font-size:14px;font-weight:750;line-height:1.4;transition:background .18s,color .18s}
.cmsm-hero-actions .cmsm-primary-link {background:#fff;color:var(--cmsm-deep)!important;border-radius:7px;padding:12px 16px}
.cmsm-hero-actions .cmsm-primary-link:hover {background:#e6f0f6}
.cmsm-hero-actions .cmsm-secondary-link {color:#fff!important;border-bottom:1px solid rgba(255,255,255,.5);padding:6px 0}
.cmsm-hero-actions .cmsm-secondary-link:hover {border-color:#fff}

.cmsm-editions {display:flex;align-items:center;flex-wrap:wrap;gap:15px;background:#fff;border:1px solid var(--cmsm-line);padding:15px 20px;border-radius:12px;margin:22px 0 0}
.cmsm-editions strong {font-size:14px;color:var(--cmsm-navy)}
.cmsm-editions>div {display:flex;gap:9px;flex-wrap:wrap}
.cmsm-editions a {display:inline-flex;background:#edf3f7;border-radius:6px;padding:6px 13px;color:var(--cmsm-navy);font-size:14px;font-weight:700}
.cmsm-editions a.is-current {background:var(--cmsm-navy);color:#fff}

/* Blocos institucionais */
.cmsm-section {margin-top:43px;scroll-margin-top:30px}
.cmsm-section-heading {border-left:4px solid var(--cmsm-teal);padding:0 0 0 15px;margin-bottom:20px}
.cmsm-section-heading h2 {margin:0 0 5px;color:var(--cmsm-navy)}
.cmsm-section-heading p {font-size:14px;color:var(--cmsm-muted);margin:0}
.cmsm-about {background:var(--cmsm-soft);border:1px solid #e7eef3;padding:28px 32px;border-radius:14px}
.cmsm-about .cmsm-section-heading {margin-bottom:15px}
.cmsm-rich {font-size:15.5px;line-height:1.8;overflow-wrap:anywhere}
.cmsm-rich p:last-child {margin-bottom:0}
.cmsm-rich h3 {font-size:19px;margin:25px 0 12px}
.cmsm-rich h4 {font-size:17px;margin:20px 0 8px}
.cmsm-rich ul,.cmsm-rich ol {padding-left:24px;margin:12px 0 16px}
.cmsm-rich li {margin-bottom:6px}
.cmsm-note {margin-top:18px!important;color:#607184;font-size:13px}

/* Estudantes e Mesa Diretora */
.cmsm-grid {display:grid;gap:17px}
.cmsm-desk-grid,.cmsm-students-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
.cmsm-student {
  display:flex;
  flex-direction:column;
  overflow:hidden;
  min-width:0;
  border:1px solid var(--cmsm-line);
  border-radius:13px;
  background:#fff;
  color:var(--cmsm-ink)!important;
  box-shadow:0 2px 7px rgba(26,55,82,.025);
  transition:box-shadow .18s,transform .18s,border-color .18s;
}
.cmsm-student:hover {transform:translateY(-3px);border-color:#b8cedc;box-shadow:0 12px 28px rgba(26,55,82,.13)}
.cmsm-student-photo {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  height:198px;
  background:linear-gradient(142deg,#e0eaf2,#f1f5f8);
  flex:none;
}
.cmsm-portrait-img {display:block;width:100%!important;height:100%!important;object-fit:cover;object-position:center 26%}
.cmsm-portrait-placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  width:86px;height:86px;
  border-radius:50%;
  background:#bed0df;
  color:#274761;
  font-size:28px;
  font-weight:800;
  letter-spacing:.015em;
}
.cmsm-student-info {display:flex;flex:1;flex-direction:column;gap:7px;min-height:154px;padding:19px 18px 17px}
.cmsm-student-info strong {display:block;font-size:17px;line-height:1.35;font-weight:800;color:var(--cmsm-navy);overflow-wrap:anywhere}
.cmsm-student-info small {display:block;color:var(--cmsm-muted);font-size:13px;line-height:1.5}
.cmsm-card-link {display:inline-flex;align-items:center;gap:6px;color:var(--cmsm-teal);font-size:13px;font-weight:750;margin-top:auto;padding-top:9px}
.cmsm-student:hover .cmsm-card-link {color:#104a66}
.cmsm-leadership {border-color:#c5d9e6;box-shadow:0 4px 18px rgba(20,53,79,.055)}
.cmsm-leadership .cmsm-student-photo {background:linear-gradient(137deg,#cddfe9,#e7f0f5)}
.cmsm-leadership .cmsm-student-info {background:linear-gradient(180deg,#fcfdff,#f7fafd)}
.cmsm-photo-role {position:absolute;left:12px;bottom:12px;max-width:calc(100% - 24px);background:rgba(15,45,71,.94);color:#fff;border-radius:5px;padding:5px 10px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.035em}

/* Lista de sessões e atividades */
.cmsm-event-list {display:grid;gap:13px}
.cmsm-event {
  display:flex;
  align-items:flex-start;
  gap:22px;
  padding:22px 25px;
  border:1px solid var(--cmsm-line);
  border-radius:13px;
  background:#fff;
  color:var(--cmsm-ink)!important;
  transition:border-color .18s,box-shadow .18s,transform .18s;
}
.cmsm-event:hover {transform:translateY(-2px);border-color:#abc9d9;box-shadow:0 9px 27px rgba(20,43,70,.08)}
.cmsm-event.is-featured {border-left:4px solid var(--cmsm-teal);padding-left:22px}
.cmsm-datebox {display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;min-width:84px;min-height:89px;border-radius:9px;background:#e8f1f7;line-height:1.1;color:var(--cmsm-navy);padding:9px}
.cmsm-datebox strong {font-size:32px;font-weight:800;font-variant-numeric:tabular-nums}
.cmsm-datebox small {font-size:12px;font-weight:800;letter-spacing:.08em;margin-top:5px}
.cmsm-event-info {display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:6px}
.cmsm-event-info>strong {display:block;font-size:19px;line-height:1.35;font-weight:800;color:var(--cmsm-navy)}
.cmsm-event-info>small {display:block;color:var(--cmsm-muted);font-size:13px;line-height:1.5}
.cmsm-event-summary {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#40566d;font-size:14px;line-height:1.55;margin-top:2px}
.cmsm-tag,.cmsm-pill {display:inline-block;background:#e6f2f7;color:#1b627c;border-radius:20px;padding:4px 11px;font-size:11px;font-weight:800;line-height:1.4;align-self:flex-start}
.cmsm-featured-label {display:inline-block;color:#84601f;font-size:11px;font-weight:700}

/* Páginas internas: estudantes e atividades */
.cmsm-back {margin:0 0 18px!important}
.cmsm-back a {font-weight:750;color:var(--cmsm-teal)!important;font-size:14px}
.cmsm-detail {background:#fff;border:1px solid var(--cmsm-line);border-radius:16px;padding:clamp(24px,3.5vw,43px);box-shadow:0 6px 24px rgba(20,43,70,.035)}
.cmsm-person-detail {display:grid;grid-template-columns:250px minmax(0,1fr);gap:36px;align-items:start}
.cmsm-detail-portrait {width:250px;height:292px;background:#e7eff5;border-radius:12px;overflow:hidden;display:flex;justify-content:center;align-items:center}
.cmsm-detail-portrait .cmsm-portrait-placeholder {width:125px;height:125px;font-size:40px}
.cmsm-person-copy .cmsm-kicker {color:var(--cmsm-teal)}
.cmsm-person-copy h1 {font-size:clamp(29px,3.6vw,41px);margin:10px 0 16px}
.cmsm-person-copy p {margin-top:17px;font-size:16px}
.cmsm-person-copy a {color:var(--cmsm-teal)}
.cmsm-event-heading {padding-bottom:24px;border-bottom:1px solid var(--cmsm-line);margin-bottom:27px}
.cmsm-event-heading h1 {font-size:clamp(27px,3.6vw,40px);margin:12px 0}
.cmsm-event-heading p {font-size:15px;color:var(--cmsm-muted);margin:0}
.cmsm-event-cover img {width:100%;height:auto;max-height:450px;object-fit:cover;border-radius:12px}
.cmsm-detail-section {margin-top:34px}
.cmsm-detail-section h2 {font-size:23px;border-bottom:1px solid var(--cmsm-line);padding-bottom:12px;margin-bottom:18px}
.cmsm-propositions {background:var(--cmsm-soft);border:1px solid #e4eaf0;padding:clamp(18px,3vw,29px);border-radius:12px}
.cmsm-propositions .cmsm-rich h3 {border-top:1px solid #e0e8ef;padding-top:18px}
.cmsm-document {display:flex;align-items:center;gap:15px;background:#f0f5fa;border:1px solid var(--cmsm-line);padding:17px 20px;border-radius:10px;color:var(--cmsm-navy)!important}
.cmsm-document:hover {background:#e6f0f7}
.cmsm-document>span:first-child {font-size:33px;color:var(--cmsm-teal)}
.cmsm-document>span:nth-child(2) {flex:1;display:flex;flex-direction:column}
.cmsm-document small {font-size:12px;color:var(--cmsm-muted)}
.cmsm-video {position:relative;width:100%;aspect-ratio:16/9}
.cmsm-video iframe {position:absolute;inset:0;width:100%;height:100%;border:0}
.cmsm-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.cmsm-gallery a {display:block;aspect-ratio:4/3;overflow:hidden;border-radius:8px;background:#edf3f8}
.cmsm-gallery img {width:100%;height:100%;object-fit:cover}
.cmsm-empty {background:#f4f7fa;padding:32px;border-radius:12px}

@media(max-width:930px) {
  .cmsm-desk-grid,.cmsm-students-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
  .cmsm-desk-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .cmsm-student-photo {height:192px}
}
@media(max-width:640px) {
  .cmsm {width:calc(100vw - 24px);margin-top:0;margin-bottom:48px}
  .cmsm-hero {min-height:auto;padding:32px 24px;border-radius:13px}
  .cmsm-hero::before {width:270px;height:270px;right:-130px;top:-75px}
  .cmsm-hero h1 {font-size:36px}
  .cmsm-hero-actions {gap:11px;margin-top:21px}
  .cmsm-hero-actions a {font-size:13px}
  .cmsm-about {padding:22px 20px}
  .cmsm-section {margin-top:35px}
  .cmsm-grid {gap:12px}
  .cmsm-desk-grid,.cmsm-students-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .cmsm-student-photo {height:152px}
  .cmsm-portrait-placeholder {width:67px;height:67px;font-size:23px}
  .cmsm-student-info {padding:14px 13px;min-height:151px;gap:6px}
  .cmsm-student-info strong {font-size:15px}
  .cmsm-student-info small {font-size:12px}
  .cmsm-photo-role {font-size:10px;bottom:8px;left:8px;padding:4px 7px}
  .cmsm-event {gap:12px;padding:17px 14px}
  .cmsm-event.is-featured {padding-left:11px}
  .cmsm-datebox {min-width:62px;min-height:71px;padding:7px}
  .cmsm-datebox strong {font-size:27px}
  .cmsm-event-info>strong {font-size:16px}
  .cmsm-event-summary {font-size:13px}
  .cmsm-detail {padding:22px 18px}
  .cmsm-person-detail {grid-template-columns:1fr;gap:18px}
  .cmsm-detail-portrait {width:190px;height:222px}
  .cmsm-gallery {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:365px) {
  .cmsm-students-grid,.cmsm-desk-grid {grid-template-columns:1fr}
  .cmsm-student-photo {height:185px}
  .cmsm-hero-actions {align-items:stretch;flex-direction:column}
  .cmsm-hero-actions .cmsm-primary-link {justify-content:center}
}
@media(prefers-reduced-motion:reduce) {
  .cmsm-student,.cmsm-event,.cmsm-hero-actions a {transition:none}
  .cmsm-student:hover,.cmsm-event:hover {transform:none}
}
