/* Regimento Escolar
   Extends the existing global css/styles.css. */

:root {
  scroll-padding-top: 84px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
  margin-bottom: 30px;
  transition: color .18s ease;
}

.back-link:hover { color: var(--accent); }

.regimento-intro {
  padding: 24px 0 48px;
}

.regimento-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.regimento-heading h1 {
  margin-bottom: 8px;
}

.regimento-heading p {
  max-width: 580px;
  margin-bottom: 0;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.document-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.regimento-body {
  padding-top: 56px;
}

.regimento-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.regimento-index {
  min-width: 0;
  position: sticky;
  top: 64px;
}

.index-inner {
  position: sticky;
  top: 84px;
}

.index-label {
  display: block;
  color: var(--title);
  font-weight: 600;
  margin-bottom: 12px;
}

.regimento-index nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.regimento-index a {
  display: block;
  padding: 7px 0 7px 14px;
  color: var(--body);
  line-height: 1.4;
  transition: color .18s ease, border-color .18s ease;
  border-left: 1px solid transparent;
  margin-left: -1px;
}

.regimento-index a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.regimento-content {
  min-width: 0;
}

.regimento-section {
  padding: 0 0 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.regimento-section:last-child {
  margin-bottom: 0;
}

.title-row {
  display: block;
  margin-bottom: 12px;
  position: sticky;
  background-color: #fff;
  padding-top: 16px;
  padding-bottom: 16px;
  top: 54px;
}

.title-row h2 {
  margin: 3px 0 0;
}


.title-number {
  display: block;
  color: var(--accent);
  font-weight: 600;
}

.regimento-section > p {
  max-width: 620px;
}

.static-details {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.static-details-head {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  color: var(--title);
  font-weight: 600;
  background: var(--white);
}

.details-content {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.details-content p:last-child {
  margin-bottom: 0;
}

.details-content strong {
  color: var(--title);
}

.regimento-highlight {
  border-radius: var(--radius);
  margin-bottom: 48px;
}

.key-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
}

.key-grid > div {
  min-height: 150px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.key-grid > div:nth-child(2n) {
  border-left: 1px solid var(--border);
}

.key-grid > div:nth-child(n+3) {
  border-top: 1px solid var(--border);
}

.key-grid i {
  color: var(--accent);
  font-size: 16px;
  margin-bottom: 32px;
}

.key-grid strong {
  color: var(--title);
  margin-bottom: 4px;
}

.key-grid span {
  color: var(--body);
}

.key-grid-2 > div:nth-child(n+3) {
  border-top: 0;
}

.official-note {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.official-note > i {
  color: var(--accent);
  font-size: 18px;
  margin-top: 2px;
}

.official-note strong {
  color: var(--title);
}

.official-note p {
  margin: 2px 0 0;
}

@media (max-width: 760px) {
  .regimento-intro {
    padding: 52px 0 36px;
  }

  .regimento-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .regimento-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .regimento-index {
    overflow-x: auto;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .index-inner {
    position: static;
    min-width: max-content;
  }

  .index-label {
    margin-bottom: 8px;
  }

  .regimento-index nav {
    flex-direction: row;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .regimento-index a {
    padding: 8px 14px;
    border-left: 0;
    border-bottom: 1px solid transparent;
    margin: 0 0 -1px;
    max-width: 180px;
  }

  .regimento-index a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }

  .regimento-highlight {
    padding: 18px;
  }

  .key-grid {
    grid-template-columns: 1fr;
  }

  .key-grid > div:nth-child(2n) {
    border-left: 0;
  }

  .key-grid > div + div {
    border-top: 1px solid var(--border);
  }

  .key-grid-2 > div + div {
    border-top: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  .regimento-section summary i {
    transition: none;
  }
}
