/* =====================================================================
   TELA: MATERIAIS (lista de documentos p/ download)
   ===================================================================== */

.materials-content {
  padding-top: 34px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-x: hidden;
}

.materials-video-section {
  display: grid;
  gap: 13px;
  margin-bottom: 10px;
}

.materials-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 3px;
}

.materials-section-heading > span:last-child {
  display: grid;
  gap: 2px;
}

.materials-section-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.93rem;
  line-height: 1.2;
}

.materials-section-heading small {
  color: #60758a;
  font-size: 0.7rem;
}

.materials-section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #567ab8, var(--navy));
  box-shadow: 0 6px 14px rgba(0, 62, 112, 0.18);
}

.materials-section-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.materials-video-grid {
  display: grid;
  gap: 12px;
}

.material-video-card {
  overflow: hidden;
  border: 1px solid rgba(0, 62, 112, 0.12);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 62, 112, 0.1);
}

.material-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #071a2a;
}

.material-video-info {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px 12px 15px;
}

.material-video-info > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.material-video-info strong {
  color: var(--navy);
  font-size: 0.87rem;
}

.material-video-info small {
  color: #60758a;
  font-size: 0.68rem;
}

.material-video-info a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 10px;
  color: #fff;
  background: var(--navy);
  font-size: 0.71rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.material-video-info a:hover,
.material-video-info a:focus-visible {
  background: #005b9f;
  outline: 3px solid rgba(0, 91, 159, 0.18);
}

.material-video-info a:active {
  transform: scale(0.97);
}

.material-video-info a svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.materials-documents-heading {
  margin-top: 5px;
  margin-bottom: 1px;
}

.material-row {
  grid-template-columns: 54px 1fr 34px;
  min-height: 68px;
}

.material-file-row {
  width: 100%;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 84px;
  padding-right: 10px;
}

.material-file-info {
  min-width: 0;
}

.material-file-info small {
  color: #60758a;
}

.material-file-actions {
  display: flex;
  gap: 6px;
}

.material-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.material-action-download {
  background: var(--navy);
  color: #fff;
}

.material-action:hover,
.material-action:focus-visible {
  background: var(--navy);
  color: #fff;
}

.material-action:active {
  transform: scale(0.97);
}

/* Em telas largas, a área de documentos precisa ter uma largura explícita.
   Isso evita que o posicionamento absoluto do content-card comprima os cards. */
@media (min-width: 781px) {
  #materiais .materials-content {
    right: auto;
    left: 50%;
    width: min(calc(100% - 64px), 820px);
    max-width: none;
    margin: 0;
    padding: 34px 32px;
    transform: translateX(-50%);
  }

  #materiais .material-file-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 84px;
  }

  #materiais .materials-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .material-file-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding-left: 6px;
  }

  .material-file-row .doc-icon {
    width: 32px;
    height: 38px;
  }

  .material-file-actions {
    flex-direction: column;
  }

  .material-action {
    min-height: 28px;
    padding: 5px 8px;
  }
}

.doc-icon,
.download-icon {
  display: block;
  color: var(--navy);
}

.doc-icon {
  position: relative;
  width: 36px;
  height: 42px;
  justify-self: center;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.doc-icon::before {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 14px;
  height: 2px;
  content: "";
  background: currentColor;
  box-shadow: 0 8px 0 currentColor;
}

.download-icon {
  position: relative;
  width: 26px;
  height: 28px;
}

.download-icon::before {
  position: absolute;
  top: 1px;
  left: 11px;
  width: 4px;
  height: 15px;
  content: "";
  background: currentColor;
}

.download-icon::after {
  position: absolute;
  inset: 10px 2px 2px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  content: "";
}
